script-updates: add error handling back in

We have to make sure the script does not terminate on first error...
This commit is contained in:
Christian Hesse 2018-09-14 11:10:03 +02:00
parent 8b1ed433ed
commit ea5083a427

View file

@ -36,13 +36,15 @@
:if ($ignore = 0) do={ :if ($ignore = 0) do={
:log debug ("Fetching script from url: " . $scriptname); :log debug ("Fetching script from url: " . $scriptname);
:local result [ / tool fetch check-certificate=yes-without-crl \ :do {
($"script-updates-baseurl" . $scriptname . $"script-updates-urlsuffix") \ :local result [ / tool fetch check-certificate=yes-without-crl \
output=user as-value ]; ($"script-updates-baseurl" . $scriptname . $"script-updates-urlsuffix") \
:if ($result->"status" = "finished") do={ output=user as-value ];
:set sourcenew ($result->"data"); :if ($result->"status" = "finished") do={
} else={ :set sourcenew ($result->"data");
:log debug ("Failed fetching " . $scriptname); }
} on-error={
:log info ("Failed fetching " . $scriptname);
} }
} }
} }