mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
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:
parent
8b1ed433ed
commit
ea5083a427
1 changed files with 9 additions and 7 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue