mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
07e54dd88b
... for better formatting in export.
29 lines
571 B
Text
29 lines
571 B
Text
#
|
|
# RouterOS script: sms-action
|
|
# Copyright (c) 2018 Christian Hesse <mail@eworm.de>
|
|
#
|
|
# run action on received SMS
|
|
|
|
:log info ("Received SMS with action '" . $action . "'");
|
|
# delay a second to give log servers a chance to get the info
|
|
:delay 1s;
|
|
|
|
:if ($action = "reboot") do={
|
|
/ system reboot;
|
|
}
|
|
|
|
:if ($action = "shutdown") do={
|
|
/ system shutdown;
|
|
}
|
|
|
|
:if ($action = "update") do={
|
|
/ system package update install;
|
|
}
|
|
|
|
:if ($action= "trackon") do={
|
|
/ system scheduler enable gps-track;
|
|
}
|
|
|
|
:if ($action = "trackoff") do={
|
|
/ system scheduler disable gps-track;
|
|
}
|