aboutsummaryrefslogtreecommitdiffstats
path: root/dhcp-to-dns.rsc
diff options
context:
space:
mode:
Diffstat (limited to 'dhcp-to-dns.rsc')
-rw-r--r--dhcp-to-dns.rsc12
1 files changed, 8 insertions, 4 deletions
diff --git a/dhcp-to-dns.rsc b/dhcp-to-dns.rsc
index 9bf506f..9b94098 100644
--- a/dhcp-to-dns.rsc
+++ b/dhcp-to-dns.rsc
@@ -1,17 +1,18 @@
#!rsc by RouterOS
# RouterOS script: dhcp-to-dns
-# 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
#
# provides: lease-script, order=20
# requires RouterOS, version=7.16
#
# check DHCP leases and add/remove/update DNS entries
-# https://git.eworm.de/cgit/routeros-scripts/about/doc/dhcp-to-dns.md
+# https://rsc.eworm.de/doc/dhcp-to-dns.md
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
+:local ExitOK false;
:do {
:local ScriptName [ :jobname ];
@@ -27,6 +28,7 @@
:global ScriptLock;
:if ([ $ScriptLock $ScriptName 10 ] = false) do={
+ :set ExitOK true;
:error false;
}
@@ -123,4 +125,6 @@
$LogPrint debug $ScriptName ("No address available... Ignoring.");
}
}
-} on-error={ }
+} on-error={
+ :global ExitError; $ExitError $ExitOK [ :jobname ];
+}