mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-01-27 11:29:34 +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 . "')...");
|
"' (file '" . $CertFileName . "')...");
|
||||||
|
|
||||||
:do {
|
:do {
|
||||||
/tool/fetch check-certificate=yes-without-crl http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) \
|
:onerror Err {
|
||||||
($CertRenewUrl . $CertFileName) dst-path=$CertFileName as-value;
|
/tool/fetch check-certificate=yes-without-crl \
|
||||||
$WaitForFile $CertFileName;
|
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;
|
:local DecryptionFailed true;
|
||||||
:foreach I,PassPhrase in=$CertRenewPass do={
|
:foreach I,PassPhrase in=$CertRenewPass do={
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue