aboutsummaryrefslogtreecommitdiffstats
path: root/sms-action
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2018-08-06 16:05:34 +0200
committerGravatar Christian Hesse <mail@eworm.de>2018-08-06 16:05:34 +0200
commita6d4e5eec8c7a7a78e883941d13caf3fb9623ea9 (patch)
tree7df0b4a32006ffda914ec9165f850bd2f8ef5c91 /sms-action
parentc9c87cac4137242ece4a55955e8400592440fb55 (diff)
add script 'sms-action'
Diffstat (limited to 'sms-action')
-rw-r--r--sms-action26
1 files changed, 26 insertions, 0 deletions
diff --git a/sms-action b/sms-action
new file mode 100644
index 0000000..3d3fd5a
--- /dev/null
+++ b/sms-action
@@ -0,0 +1,26 @@
+# RouterOS script: sms-action
+# Copyright (c) 2018 Christian Hesse <mail@eworm.de>
+#
+# run action on received SMS
+
+:log info ("Received SMS with action '" . $action . "'");
+
+: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;
+}