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