mirror of
https://github.com/pothi/mikrotik-scripts.git
synced 2025-06-30 09:44:28 +02:00
Add a couple of script to check and / or alert upon new ROS version and LTE firmware
This commit is contained in:
parent
55320e161e
commit
77c3a09a13
2 changed files with 24 additions and 0 deletions
10
scripts/alert-upon-new-version.rsc
Normal file
10
scripts/alert-upon-new-version.rsc
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# Using: https://wiki.mikrotik.com/wiki/Manual:Upgrading_RouterOS#RouterOS_auto-upgrade
|
||||||
|
:global emailAddress "noreply@example.com";
|
||||||
|
|
||||||
|
/system package update;
|
||||||
|
check-for-updates once;
|
||||||
|
:delay 10s;
|
||||||
|
:if ( [get status] = "New version is available") do={
|
||||||
|
/tool e-mail send to="$emailAddress" subject="[Mikrotik] Software Up\
|
||||||
|
date Available" body="A new update is available for your MikroTik device"
|
||||||
|
}
|
14
scripts/firmware-check.rsc
Normal file
14
scripts/firmware-check.rsc
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
:local installedFirmware;
|
||||||
|
:local latestFirmware;
|
||||||
|
|
||||||
|
set $installedFirmware ([/int lte info lte1 once as-value]->"revision");
|
||||||
|
:put " Installed Firmware: $installedFirmware";
|
||||||
|
|
||||||
|
set $latestFirmware ([/int lte firmware-upgrade lte1 as-value]->"latest");
|
||||||
|
:put " Latest Firmware: $latestFirmware";
|
||||||
|
|
||||||
|
:if ($installedFirmware != $latestFirmware) do={
|
||||||
|
:log info "A firmware update is available!!";
|
||||||
|
} else={
|
||||||
|
:log info "The installed firmware is the latest firmware!";
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue