mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-26 13:54:36 +02:00
check-certificates: fix typo and syntax
This commit is contained in:
parent
e4b10d4b76
commit
94607496ae
1 changed files with 2 additions and 2 deletions
|
@ -126,7 +126,7 @@ $WaitFullyConnected;
|
||||||
:if ($CertVal->"fingerprint" != [ /certificate/get $Cert fingerprint ]) do={
|
:if ($CertVal->"fingerprint" != [ /certificate/get $Cert fingerprint ]) do={
|
||||||
$LogPrintExit2 debug $0 ("Certificate '" . $CertVal->"name" . "' was updated in place.") false;
|
$LogPrintExit2 debug $0 ("Certificate '" . $CertVal->"name" . "' was updated in place.") false;
|
||||||
:set CertVal [ /certificate/get $Cert ];
|
:set CertVal [ /certificate/get $Cert ];
|
||||||
} else {
|
} else={
|
||||||
$LogPrintExit2 debug $0 ("Certificate '" . $CertVal->"name" . "' was not updated, but replaced.") false;
|
$LogPrintExit2 debug $0 ("Certificate '" . $CertVal->"name" . "' was not updated, but replaced.") false;
|
||||||
|
|
||||||
:local CertNew [ /certificate/find where name~("^" . [ $EscapeForRegEx [ $UrlEncode $LastName ] ] . "\\.(p12|pem)_[0-9]+\$") \
|
:local CertNew [ /certificate/find where name~("^" . [ $EscapeForRegEx [ $UrlEncode $LastName ] ] . "\\.(p12|pem)_[0-9]+\$") \
|
||||||
|
@ -153,7 +153,7 @@ $WaitFullyConnected;
|
||||||
/certificate/remove $Cert;
|
/certificate/remove $Cert;
|
||||||
/certificate/set $CertNew name=($CertVal->"name");
|
/certificate/set $CertNew name=($CertVal->"name");
|
||||||
:set CertNewVal;
|
:set CertNewVal;
|
||||||
:set CertVal [ /certificate/get $CertNew ];;
|
:set CertVal [ /certificate/get $CertNew ];
|
||||||
}
|
}
|
||||||
|
|
||||||
$SendNotification2 ({ origin=$0; silent=true; \
|
$SendNotification2 ({ origin=$0; silent=true; \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue