mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-07-16 14:21:34 +00:00
global-functions: $ScriptInstallUpdate: allow to force checksums
This is a follow-up on aa14c26488 and
allows to use checksums for custom hosting.
This commit is contained in:
parent
93e593a891
commit
532fb45602
1 changed files with 3 additions and 1 deletions
|
|
@ -1282,6 +1282,7 @@
|
|||
:global IDonate;
|
||||
:global NoNewsAndChangesNotification;
|
||||
:global ScriptUpdatesBaseUrl;
|
||||
:global ScriptUpdatesCheckSums;
|
||||
:global ScriptUpdatesCRLF;
|
||||
:global ScriptUpdatesUrlSuffix;
|
||||
|
||||
|
|
@ -1318,7 +1319,8 @@
|
|||
:local DeviceMode [ /system/device-mode/get ];
|
||||
|
||||
:local CheckSums ({});
|
||||
:if ([ :pick $ScriptUpdatesBaseUrl 0 21 ] = "https://rsc.eworm.de/") do={
|
||||
:if ([ :pick $ScriptUpdatesBaseUrl 0 21 ] = "https://rsc.eworm.de/" || \
|
||||
$ScriptUpdatesCheckSums = true) do={
|
||||
:onerror Err {
|
||||
:local Url ($ScriptUpdatesBaseUrl . "checksums.json" . $ScriptUpdatesUrlSuffix);
|
||||
$LogPrint debug $0 ("Fetching checksums from url: " . $Url);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue