mirror of
https://github.com/pothi/mikrotik-scripts.git
synced 2025-07-12 15:44:28 +02:00
Make the script importable
This commit is contained in:
parent
95e186fffb
commit
04cb8d03a6
1 changed files with 13 additions and 9 deletions
|
@ -1,10 +1,14 @@
|
|||
# Using: https://wiki.mikrotik.com/wiki/Manual:Upgrading_RouterOS#RouterOS_auto-upgrade
|
||||
:global emailAddress "noreply@example.com";
|
||||
/system script
|
||||
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"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue