mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-09 17:44:29 +02:00
global-functions: $ScriptInstallUpdate: give final url in debug output
(cherry picked from commit b4a5d824a2
)
This commit is contained in:
parent
5363df3568
commit
9024e20c0b
1 changed files with 6 additions and 7 deletions
|
@ -731,15 +731,15 @@
|
||||||
:if ([ :len $SourceNew ] = 0 && $ScriptUpdatesFetch = true) do={
|
:if ([ :len $SourceNew ] = 0 && $ScriptUpdatesFetch = true) do={
|
||||||
:local Comment [ $ParseKeyValueStore ($ScriptVal->"comment") ];
|
:local Comment [ $ParseKeyValueStore ($ScriptVal->"comment") ];
|
||||||
:if (!($Comment->"ignore" = true)) do={
|
:if (!($Comment->"ignore" = true)) do={
|
||||||
$LogPrintExit2 debug $0 ("Fetching script from url: " . $ScriptVal->"name") false;
|
|
||||||
:do {
|
:do {
|
||||||
:local BaseUrl $ScriptUpdatesBaseUrl;
|
:local BaseUrl $ScriptUpdatesBaseUrl;
|
||||||
:local UrlSuffix $ScriptUpdatesUrlSuffix;
|
:local UrlSuffix $ScriptUpdatesUrlSuffix;
|
||||||
:if ([ :typeof ($Comment->"base-url") ] = "str") do={ :set BaseUrl ($Comment->"base-url"); }
|
:if ([ :typeof ($Comment->"base-url") ] = "str") do={ :set BaseUrl ($Comment->"base-url"); }
|
||||||
:if ([ :typeof ($Comment->"url-suffix") ] = "str") do={ :set UrlSuffix ($Comment->"url-suffix"); }
|
:if ([ :typeof ($Comment->"url-suffix") ] = "str") do={ :set UrlSuffix ($Comment->"url-suffix"); }
|
||||||
|
:local Url ($BaseUrl . $ScriptVal->"name" . $UrlSuffix);
|
||||||
|
|
||||||
:local Result [ / tool fetch check-certificate=yes-without-crl \
|
$LogPrintExit2 debug $0 ("Fetching script '" . $ScriptVal->"name" . "' from url: " . $Url) false;
|
||||||
($BaseUrl . $ScriptVal->"name" . $UrlSuffix) output=user as-value ];
|
:local Result [ / tool fetch check-certificate=yes-without-crl $Url output=user as-value ];
|
||||||
:if ($Result->"status" = "finished") do={
|
:if ($Result->"status" = "finished") do={
|
||||||
:set SourceNew ($Result->"data");
|
:set SourceNew ($Result->"data");
|
||||||
}
|
}
|
||||||
|
@ -804,11 +804,10 @@
|
||||||
:global GlobalConfigMigration;
|
:global GlobalConfigMigration;
|
||||||
:local ChangeLogCode;
|
:local ChangeLogCode;
|
||||||
|
|
||||||
$LogPrintExit2 debug $0 ("Fetching news, changes and migration.") false;
|
|
||||||
:do {
|
:do {
|
||||||
:local Result [ / tool fetch check-certificate=yes-without-crl \
|
:local Url ($ScriptUpdatesBaseUrl . "global-config.changes" . $ScriptUpdatesUrlSuffix);
|
||||||
($ScriptUpdatesBaseUrl . "global-config.changes" . $ScriptUpdatesUrlSuffix) \
|
$LogPrintExit2 debug $0 ("Fetching news, changes and migration: " . $Url) false;
|
||||||
output=user as-value ];
|
:local Result [ / tool fetch check-certificate=yes-without-crl $Url output=user as-value ];
|
||||||
:if ($Result->"status" = "finished") do={
|
:if ($Result->"status" = "finished") do={
|
||||||
:set ChangeLogCode ($Result->"data");
|
:set ChangeLogCode ($Result->"data");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue