mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-07-16 14:21:34 +00:00
global-functions: $ScriptInstallUpdate: log and print error
It is no longer expected to fail... So let's complain.
This commit is contained in:
parent
aa14c26488
commit
b960a9d2fb
1 changed files with 4 additions and 2 deletions
|
|
@ -1319,12 +1319,14 @@
|
||||||
|
|
||||||
:local CheckSums ({});
|
:local CheckSums ({});
|
||||||
:if ([ :pick $ScriptUpdatesBaseUrl 0 21 ] = "https://rsc.eworm.de/") do={
|
:if ([ :pick $ScriptUpdatesBaseUrl 0 21 ] = "https://rsc.eworm.de/") do={
|
||||||
:do {
|
:onerror Err {
|
||||||
: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={ }
|
} 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={
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue