将以下脚本添加到 scheduler 进行定期执行即可,周期建议1-3次检测一次。
: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.”;}
新人报道
@lywkj 欢迎