Make the script importable

This commit is contained in:
Pothi Kalimuthu 2022-01-10 14:02:36 +05:30
parent 95e186fffb
commit 04cb8d03a6

View file

@ -1,10 +1,14 @@
# Using: https://wiki.mikrotik.com/wiki/Manual:Upgrading_RouterOS#RouterOS_auto-upgrade /system script
:global emailAddress "noreply@example.com"; add dont-require-permissions=yes name="Alert on New Version" owner=admin source=":delay 60s\
\n:global emailAddress \"kpothi@gmail.com\";\
\n\
\n/system package update;\
\ncheck-for-updates once;\
\n:delay 10s;\
\n\
\n:if ( [get status] = \"New version is available\") do=\
\n /tool e-mail send to=\"\$emailAddress\" subject=\"[Mikrotik] Software Up \\\
\n date Available\" body=\"A new update is available for your MikroTik device\"\
\n}\
\n"
/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"
}