aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-03-04 15:29:33 +0100
committerGravatar Christian Hesse <mail@eworm.de>2024-03-12 15:27:15 +0100
commit5af8b95444ae161bcc38565163aa4ed56a8e3f0e (patch)
treeb5844271f7db9afa3c5b4458ca1ee394d40bba5e
parent6712cc101d57fbe47420c562ea82d36b07a5ad9c (diff)
netwatch-dns: do not exit with error
-rw-r--r--netwatch-dns.rsc9
1 files changed, 6 insertions, 3 deletions
diff --git a/netwatch-dns.rsc b/netwatch-dns.rsc
index 45c12d4..1603427 100644
--- a/netwatch-dns.rsc
+++ b/netwatch-dns.rsc
@@ -24,7 +24,8 @@
:local SettleTime (5m30s - [ /system/resource/get uptime ]);
:if ($SettleTime > 0s) do={
- $LogPrintExit2 info $ScriptName ("System just booted, giving netwatch " . $SettleTime . " to settle.") true;
+ $LogPrintExit2 info $ScriptName ("System just booted, giving netwatch " . $SettleTime . " to settle.") false;
+ :return true;
}
:local DnsServers ({});
@@ -80,7 +81,8 @@
}
:if ($DohCurrent = $HostInfo->"doh-url") do={
- $LogPrintExit2 debug $ScriptName ("Current DoH server is still up: " . $DohCurrent) true;
+ $LogPrintExit2 debug $ScriptName ("Current DoH server is still up: " . $DohCurrent) false;
+ :return true;
}
:set ($DohServers->[ :len $DohServers ]) $HostInfo;
@@ -116,7 +118,8 @@
:if ([ :typeof [ :find $Data "doh-check-OK" ] ] = "num") do={
/ip/dns/set use-doh-server=($DohServer->"doh-url") verify-doh-cert=yes;
/ip/dns/cache/flush;
- $LogPrintExit2 info $ScriptName ("Setting DoH server: " . ($DohServer->"doh-url")) true;
+ $LogPrintExit2 info $ScriptName ("Setting DoH server: " . ($DohServer->"doh-url")) false;
+ :return true;
} else={
$LogPrintExit2 warning $ScriptName ("Received unexpected response from DoH server: " . \
($DohServer->"doh-url")) false;