global-functions: $ScriptInstallUpdate: skip checksums if not rsc.eworm.de

The file is not in git repository, but generated when deploying to my
server only.
This commit is contained in:
Christian Hesse 2026-07-07 13:13:31 +02:00
parent e8fb8fe74e
commit aa14c26488

View file

@ -1318,12 +1318,14 @@
:local DeviceMode [ /system/device-mode/get ]; :local DeviceMode [ /system/device-mode/get ];
:local CheckSums ({}); :local CheckSums ({});
:do { :if ([ :pick $ScriptUpdatesBaseUrl 0 21 ] = "https://rsc.eworm.de/") do={
:local Url ($ScriptUpdatesBaseUrl . "checksums.json" . $ScriptUpdatesUrlSuffix); :do {
$LogPrint debug $0 ("Fetching checksums from url: " . $Url); :local Url ($ScriptUpdatesBaseUrl . "checksums.json" . $ScriptUpdatesUrlSuffix);
:set CheckSums [ :deserialize from=json ([ /tool/fetch check-certificate=yes-without-crl \ $LogPrint debug $0 ("Fetching checksums from url: " . $Url);
http-header-field=({ [ $FetchUserAgentStr $0 ] }) $Url output=user as-value ]->"data") ]; :set CheckSums [ :deserialize from=json ([ /tool/fetch check-certificate=yes-without-crl \
} on-error={ } http-header-field=({ [ $FetchUserAgentStr $0 ] }) $Url output=user as-value ]->"data") ];
} on-error={ }
}
:foreach Script in=[ /system/script/find where source~"^#!rsc by RouterOS\r?\n" ] do={ :foreach Script in=[ /system/script/find where source~"^#!rsc by RouterOS\r?\n" ] do={
:local ScriptVal [ /system/script/get $Script ]; :local ScriptVal [ /system/script/get $Script ];