Skip to content

Instantly share code, notes, and snippets.

@tagno25
Created October 12, 2018 14:20
Show Gist options
  • Save tagno25/b207786b02b89700860028e4e2470d14 to your computer and use it in GitHub Desktop.
Save tagno25/b207786b02b89700860028e4e2470d14 to your computer and use it in GitHub Desktop.
# Update at 3am once a week
# Make sure the time on the Mikrotik is correct or update will occur "randomly" or never
/system scheduler
add interval=1w name=Auto-Upgrade on-event="/system package update\r\
\ncheck-for-updates once\r\
\n:delay 1s;\r\
\n:if ( [get status] = \"New version is available\") do={ install }" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=jan/01/2017 start-time=03:00:20
@tagno25
Copy link
Author

tagno25 commented Dec 12, 2019

Install causes a reboot. Mikrotik's updates only get installed during the boot process. The script will check if there is a new firmware, and if there is download it and install/reboot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment