注意:
- RouterOS的更新过程并不靠谱,请自行斟酌;我只建议在long-term通道上使用自动更新
- 请预先设定好更新通道,脚本不会修改这一设置
/system script add dont-require-permissions=no name=os-upgrade owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=\ "/system package update\r\ \ncheck-for-updates once\r\ \n:delay 1s;\r\ \n:if ( [get status] = \"New version is available\") do={ install }" /system scheduler add interval=1d name=auto-upgrade on-event="/system script run update" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=jan/1/2019 start-time=04:00:00