mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-07-30 13:11:36 +00:00
Compare commits
2 commits
e8fb8fe74e
...
55eef9c692
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55eef9c692 | ||
|
|
3801cc4847 |
1 changed files with 10 additions and 6 deletions
|
|
@ -1318,12 +1318,16 @@
|
||||||
: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);
|
:onerror Err {
|
||||||
$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") ];
|
||||||
|
} do={
|
||||||
|
$LogPrint warning $0 ("Failed downloading checksums: " . $Err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
: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