mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
global-functions: $ScriptInstallUpdate: remove script on failure when installing
This commit is contained in:
@ -808,7 +808,13 @@
|
|||||||
:set SourceNew ($Result->"data");
|
:set SourceNew ($Result->"data");
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={
|
||||||
$LogPrintExit2 warning $0 ("Failed fetching script '" . $ScriptVal->"name" . "'!") false;
|
:if ($ScriptVal->"source" = "#!rsc by RouterOS\n") do={
|
||||||
|
$LogPrintExit2 warning $0 ("Failed fetching script '" . $ScriptVal->"name" . \
|
||||||
|
"', removing dummy. Typo on installation?") false;
|
||||||
|
/system/script/remove $Script;
|
||||||
|
} else={
|
||||||
|
$LogPrintExit2 warning $0 ("Failed fetching script '" . $ScriptVal->"name" . "'!") false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user