脚本-自动更新RouterOS系统

将以下脚本添加到 scheduler 进行定期执行

:log info “Checking firmware…”;
/system package update check-for-updates
:delay 10s;
:if ([/system package update get status]=”New version is available”) \
do={\
:log info “Downloading firmware”;
/system package update download
:delay 600s;
:if ([/system package update get status]=”Downloaded, please reboot router to upgrade it”) \
do={:log info “Download finish, Rebooting”;
/system reboot} \
else={:log info “Download package fail”}} \
else={:log info “No update.”;}