check-certificates: match status code in error message

The message used to be:

    Fetch failed with status 404

... but changed recently:

    failure: Status 404, NOT FOUND

The new string is in RouterOS 7.22, and changed in what ever
beta or rc release. Let's just match the status code and hope
for the best.
This commit is contained in:
Christian Hesse 2026-03-12 11:13:20 +01:00
parent 0d5ee6cf23
commit 22c3f70dab

View file

@ -60,7 +60,7 @@
http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) \
($CertRenewUrl . $CertFileName) dst-path=$CertFileName as-value;
} do={
:if ($Err != "Fetch failed with status 404") do={
:if (!($Err ~ "[Ss]tatus 404")) do={
$LogPrint warning $0 ("Failed fetching certificate: " . $Err);
}
:error false;