mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-01-26 19:09:33 +00:00
check-certificates: better error handling and reporting for downloads
This commit is contained in:
parent
2dc434b332
commit
b74e40dde1
1 changed files with 11 additions and 3 deletions
|
|
@ -55,9 +55,17 @@
|
|||
"' (file '" . $CertFileName . "')...");
|
||||
|
||||
:do {
|
||||
/tool/fetch check-certificate=yes-without-crl http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) \
|
||||
($CertRenewUrl . $CertFileName) dst-path=$CertFileName as-value;
|
||||
$WaitForFile $CertFileName;
|
||||
:onerror Err {
|
||||
/tool/fetch check-certificate=yes-without-crl \
|
||||
http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) \
|
||||
($CertRenewUrl . $CertFileName) dst-path=$CertFileName as-value;
|
||||
} do={
|
||||
:if ($Err != "Fetch failed with status 404") do={
|
||||
$LogPrint warning $0 ("Failed fetching certificate: " . $Err);
|
||||
}
|
||||
:error false;
|
||||
}
|
||||
$WaitForFile $CertFileName;
|
||||
|
||||
:local DecryptionFailed true;
|
||||
:foreach I,PassPhrase in=$CertRenewPass do={
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue