check-certificates: lock the script

This commit is contained in:
Christian Hesse 2023-06-12 08:19:14 +02:00
parent 4420c79e0c
commit e0714bdfff

View file

@ -20,6 +20,7 @@
:global IfThenElse; :global IfThenElse;
:global LogPrintExit2; :global LogPrintExit2;
:global ParseKeyValueStore; :global ParseKeyValueStore;
:global ScriptLock;
:global SendNotification2; :global SendNotification2;
:global SymbolForNotification; :global SymbolForNotification;
:global UrlEncode; :global UrlEncode;
@ -98,6 +99,7 @@
[ $FormatLine "Expires in" [ $IfThenElse (($CertVal->"expired") = true) "expired" [ $FormatExpire ($CertVal->"expires-after") ] ] ]); [ $FormatLine "Expires in" [ $IfThenElse (($CertVal->"expired") = true) "expired" [ $FormatExpire ($CertVal->"expires-after") ] ] ]);
} }
$ScriptLock $0;
$WaitFullyConnected; $WaitFullyConnected;
:foreach Cert in=[ /certificate/find where !revoked !ca !scep-url expires-after<$CertRenewTime ] do={ :foreach Cert in=[ /certificate/find where !revoked !ca !scep-url expires-after<$CertRenewTime ] do={