mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-07-16 14:21:34 +00:00
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:
parent
e8fb8fe74e
commit
aa14c26488
1 changed files with 8 additions and 6 deletions
|
|
@ -1318,12 +1318,14 @@
|
||||||
:local DeviceMode [ /system/device-mode/get ];
|
:local DeviceMode [ /system/device-mode/get ];
|
||||||
|
|
||||||
:local CheckSums ({});
|
:local CheckSums ({});
|
||||||
|
:if ([ :pick $ScriptUpdatesBaseUrl 0 21 ] = "https://rsc.eworm.de/") do={
|
||||||
:do {
|
:do {
|
||||||
:local Url ($ScriptUpdatesBaseUrl . "checksums.json" . $ScriptUpdatesUrlSuffix);
|
:local Url ($ScriptUpdatesBaseUrl . "checksums.json" . $ScriptUpdatesUrlSuffix);
|
||||||
$LogPrint debug $0 ("Fetching checksums from url: " . $Url);
|
$LogPrint debug $0 ("Fetching checksums from url: " . $Url);
|
||||||
:set CheckSums [ :deserialize from=json ([ /tool/fetch check-certificate=yes-without-crl \
|
:set CheckSums [ :deserialize from=json ([ /tool/fetch check-certificate=yes-without-crl \
|
||||||
http-header-field=({ [ $FetchUserAgentStr $0 ] }) $Url output=user as-value ]->"data") ];
|
http-header-field=({ [ $FetchUserAgentStr $0 ] }) $Url output=user as-value ]->"data") ];
|
||||||
} on-error={ }
|
} 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 ];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue