aboutsummaryrefslogtreecommitdiffstats
path: root/update-gre-address.rsc
diff options
context:
space:
mode:
Diffstat (limited to 'update-gre-address.rsc')
-rw-r--r--update-gre-address.rsc14
1 files changed, 9 insertions, 5 deletions
diff --git a/update-gre-address.rsc b/update-gre-address.rsc
index 6dd829d..cddfa92 100644
--- a/update-gre-address.rsc
+++ b/update-gre-address.rsc
@@ -1,17 +1,18 @@
#!rsc by RouterOS
# RouterOS script: update-gre-address
-# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
-# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
+# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
+# https://rsc.eworm.de/COPYING.md
#
-# requires RouterOS, version=7.14
+# requires RouterOS, version=7.15
#
# update gre interface remote address with dynamic address from
# ipsec remote peer
-# https://git.eworm.de/cgit/routeros-scripts/about/doc/update-gre-address.md
+# https://rsc.eworm.de/doc/update-gre-address.md
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
+:local ExitOK false;
:do {
:local ScriptName [ :jobname ];
@@ -20,6 +21,7 @@
:global ScriptLock;
:if ([ $ScriptLock $ScriptName ] = false) do={
+ :set ExitOK true;
:error false;
}
@@ -39,4 +41,6 @@
}
}
}
-} on-error={ }
+} on-error={
+ :global ExitError; $ExitError $ExitOK [ :jobname ];
+}