aboutsummaryrefslogtreecommitdiffstats
path: root/gps-track.rsc
diff options
context:
space:
mode:
Diffstat (limited to 'gps-track.rsc')
-rw-r--r--gps-track.rsc15
1 files changed, 10 insertions, 5 deletions
diff --git a/gps-track.rsc b/gps-track.rsc
index a2ea9ff..dea56d2 100644
--- a/gps-track.rsc
+++ b/gps-track.rsc
@@ -1,16 +1,18 @@
#!rsc by RouterOS
# RouterOS script: gps-track
-# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
-# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
+# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
+# https://rsc.eworm.de/COPYING.md
#
-# requires RouterOS, version=7.14
+# requires RouterOS, version=7.15
+# requires device-mode, fetch
#
# track gps data by sending json data to http server
-# https://git.eworm.de/cgit/routeros-scripts/about/doc/gps-track.md
+# https://rsc.eworm.de/doc/gps-track.md
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
+:local ExitOK false;
:do {
:local ScriptName [ :jobname ];
@@ -23,6 +25,7 @@
:global WaitFullyConnected;
:if ([ $ScriptLock $ScriptName ] = false) do={
+ :set ExitOK true;
:error false;
}
$WaitFullyConnected;
@@ -45,4 +48,6 @@
} else={
$LogPrint debug $ScriptName ("GPS data not valid.");
}
-} on-error={ }
+} on-error={
+ :global ExitError; $ExitError $ExitOK [ :jobname ];
+}