Hi all,
is it possible (I didn't find) to run script after the system boot's up? I'm running RouterOS with watchdog and I want to know when the system reboots due to failure.
/system script add name=bootup source={
:local upt; :set upt [/system resource get uptime]
:local runc; :set runc [/system scheduler get run run-count]
:if (($upt<61s)&&($runc<=1)) do={
/tool send to=name@domain.com subject="Router has rebooted!"
}
}
/system scheduler add name=run interval=1m on-event=bootup disabled=no
/system scheduler
add name=on-startup policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-time=startup \
on-event=":delay 60s;# after initial delay for give time to start all services, insert what you want do here"