mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-08 00:54:29 +02:00
update-tunnelbroker: check status of certificate download
Also use $LogPrintExit...
This commit is contained in:
parent
dfeaa1ed41
commit
a304a2fa69
1 changed files with 5 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue