Confirm reboot in script
Posted: Thu Feb 24, 2022 9:07 am
Hi
I want to reboot my router daily at 7 AM.
I write a schedule and It was working fine:
But someday after updating the router (currently 6.49.3), this stops working.
I try to run the command and It asking me for confirming the action by pressing y.
How can I force reboot or pipe "y" to the command in my schedule?
I want something like
or
I want to reboot my router daily at 7 AM.
I write a schedule and It was working fine:
Code: Select all
/system scheduler
add interval=1d name=daily-reboot on-event="/system reboot" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=feb/01/2020 start-time=07:00:00
I try to run the command and It asking me for confirming the action by pressing y.
Code: Select all
/system reboot
Reboot, yes? [y/N]:
How can I force reboot or pipe "y" to the command in my schedule?
I want something like
Code: Select all
/system reboot --force
Code: Select all
echo y | /system reboot