aboutsummaryrefslogtreecommitdiffstats
path: root/sms-action
blob: 7ff4b8f550701cb48d596b4923a74c3699044f39 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#
# 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;
}