User Tools

Site Tools


networking:router:mikrotik_reboot

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
networking:router:mikrotik_reboot [2016/11/21 11:42]
gcooper
networking:router:mikrotik_reboot [2018/11/30 11:32] (current)
gcooper
Line 16: Line 16:
  
 <file> <file>
-/system scheduler add comment="Reboot the Mikrotik Router" name=Reboot \+/system scheduler add comment="Scheduled Reboot" name=reboot \
   on-event="/system reboot" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive \   on-event="/system reboot" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive \
   start-date=nov/21/2016 start-time=18:30:00   start-date=nov/21/2016 start-time=18:30:00
Line 26: Line 26:
  
 <file> <file>
-/system scheduler add comment="Reboot the Mikrotik Router Daily" name=Reboot24 interval=24h \+/system scheduler add comment="Scheduled Reboot Daily" name=Reboot24 interval=24h \
   on-event="/system reboot" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive \   on-event="/system reboot" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive \
   start-date=jan/01/1970 start-time=00:00:10   start-date=jan/01/1970 start-time=00:00:10
 </file> </file>
 +
 +===== Startup Notification =====
 +
 +Edit this for the **destination e-mail address**, then paste it into a terminal to create a new schedule:
 +
 +<file>
 +/system scheduler
 +add name=reboot-notification comment="Send notification that the router was rebooted" on-event="delay 30\r\
 +      \n/log print file=logfile;\r\
 +      \ndelay 10\r\
 +      \n/tool e-mail send to=\"EnterEmailHere\" subject=\"\$[/system identity get name] - Rebooted at \$[/system clock get time] \$[/system clock get date]\" body=\"See attached log.\" file=\"logfile.txt\"\r\
 +      \ndelay 5\r\
 +      \n/file remove logfile.txt\r\
 +      \nlog info \"email sent and logfile deleted\"\r\
 +      \n/system routerboard settings set silent-boot=no" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive start-time=startup
 +
 +</file>
 +
networking/router/mikrotik_reboot.1479753733.txt.gz · Last modified: 2016/11/21 11:42 by gcooper