aboutsummaryrefslogtreecommitdiffstats
path: root/ipsec-to-dns.rsc
diff options
context:
space:
mode:
Diffstat (limited to 'ipsec-to-dns.rsc')
-rw-r--r--ipsec-to-dns.rsc15
1 files changed, 10 insertions, 5 deletions
diff --git a/ipsec-to-dns.rsc b/ipsec-to-dns.rsc
index bd74a8f..26dab0a 100644
--- a/ipsec-to-dns.rsc
+++ b/ipsec-to-dns.rsc
@@ -1,16 +1,18 @@
#!rsc by RouterOS
# RouterOS script: ipsec-to-dns
-# Copyright (c) 2021-2024 Christian Hesse <mail@eworm.de>
-# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
+# Copyright (c) 2021-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, ipsec
#
# and add/remove/update DNS entries from IPSec mode-config
-# https://git.eworm.de/cgit/routeros-scripts/about/doc/ipsec-to-dns.md
+# https://rsc.eworm.de/doc/ipsec-to-dns.md
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
+:local ExitOK false;
:do {
:local ScriptName [ :jobname ];
@@ -26,6 +28,7 @@
:global ScriptLock;
:if ([ $ScriptLock $ScriptName ] = false) do={
+ :set ExitOK true;
:error false;
}
@@ -76,4 +79,6 @@
/ip/dns/static/add name=$Fqdn address=($PeerVal->"dynamic-address") ttl=$Ttl comment=$Comment place-before=$PlaceBefore;
}
}
-} on-error={ }
+} on-error={
+ :global ExitError; $ExitError $ExitOK [ :jobname ];
+}