mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-03-05 13:39:35 +00:00
global-functions: $DownloadPackage: :do ... on-error=... -> :onerror ... do=...
This commit is contained in:
parent
84474d8910
commit
8787b5ddb6
1 changed files with 3 additions and 3 deletions
|
|
@ -393,15 +393,15 @@
|
|||
$LogPrint debug $0 ("... from url: " . $Url);
|
||||
:local Retry 3;
|
||||
:while ($Retry > 0) do={
|
||||
:do {
|
||||
:onerror Err {
|
||||
/tool/fetch check-certificate=yes-without-crl $Url dst-path=$PkgDest;
|
||||
$WaitForFile $PkgDest;
|
||||
|
||||
:if ([ /file/get [ find where name=$PkgDest ] type ] = "package") do={
|
||||
:return true;
|
||||
}
|
||||
} on-error={
|
||||
$LogPrint debug $0 ("Downloading package file failed.");
|
||||
} do={
|
||||
$LogPrint debug $0 ("Downloading package file failed: " . $Err);
|
||||
}
|
||||
|
||||
$RmFile $PkgDest;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue