aboutsummaryrefslogtreecommitdiffstats
path: root/update-tunnelbroker
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-04-03 14:29:31 +0200
committerGravatar Christian Hesse <mail@eworm.de>2020-04-03 14:29:31 +0200
commita304a2fa69f68aa1c05058edc6d9569b054b5ddc (patch)
treea66bbb3be763cf76357f43642c35844a1cc3f15d /update-tunnelbroker
parentdfeaa1ed41765610295c03fe11ee47b7c3658147 (diff)
update-tunnelbroker: check status of certificate download
Also use $LogPrintExit...
Diffstat (limited to 'update-tunnelbroker')
-rw-r--r--update-tunnelbroker8
1 files changed, 5 insertions, 3 deletions
diff --git a/update-tunnelbroker b/update-tunnelbroker
index 1b5bb9e..2f7d579 100644
--- a/update-tunnelbroker
+++ b/update-tunnelbroker
@@ -27,13 +27,15 @@
:if ($PublicAddress != $InterfaceVal->"local-address") do={
:local Comment [ $ParseKeyValueStore ($InterfaceVal->"comment") ];
- $CertificateAvailable "Starfield Secure Certificate Authority - G2";
- :log info ("Local address changed, sending UPDATE to tunnelbroker! New address: " . $PublicAddress);
+ :if ([ $CertificateAvailable "Starfield Secure Certificate Authority - G2" ] = false) do={
+ $LogPrintExit error ("Downloading required certificate failed.") true;
+ }
+ $LogPrintExit info ("Local address changed, sending UPDATE to tunnelbroker! New address: " . $PublicAddress) false;
/ tool fetch check-certificate=yes-without-crl \
("https://ipv4.tunnelbroker.net/nic/update\?hostname=" . $Comment->"id") \
user=($Comment->"user") password=($Comment->"pass") output=none;
/ interface 6to4 set $Interface local-address=$PublicAddress;
} else={
- :log debug ("All tunnelbroker configuration is up to date for interface " . $InterfaceVal->"name" . ".");
+ $LogPrintExit debug ("All tunnelbroker configuration is up to date for interface " . $InterfaceVal->"name" . ".") false;
}
}