/system package update
check-for-updates once
:delay 1s;
:if ( [get status] = "New version is available") do={ install }
:log info "Checking new version RouterOS...";
/system package update
check-for-updates once
:delay 5s;
:if ( [get status] = "System is already up to date") do={
:log info "Installed last RouterOS version, skip notification";
}
:if ( [get status] = "New version is available") do={
:log warning "Attention! New version of RouterOS is available!";
/system script run new_version_notifier
:delay 2s;
:log warning "Admin was notified by PUSH-message";
}
/system routerboard get [параметр]
При её помощи вы сможете получить такие данные:
/system routerboard upgrade
/system reboot
/system identity get name
tool fetch url="https://api.telegram.org/bot<ваш_токен>/sendMessage?chat_id=<id_чата>&text=New%20version%20RouterOS%20is%20available" dst-path=telegram.txt;
/system script run check_updates
&text=
&parse_mode=html&text=
https://api.telegram.org/bot<ваш_токен> /sendMessage?chat_id=<id_чата &parse_mode=html&text=<сообщение>"
<b>жирный</b>
<i>курсив</i>