mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-03-12 17:09:36 +00:00
global-functions: $ScriptInstallUpdate: warn when script exists...
... but is requested to be added.
This commit is contained in:
parent
76ae9686cf
commit
538071631d
1 changed files with 3 additions and 1 deletions
|
|
@ -1290,7 +1290,9 @@
|
|||
}
|
||||
|
||||
:foreach Script in=$Scripts do={
|
||||
:if ([ :len [ /system/script/find where name=$Script ] ] = 0) do={
|
||||
:if ([ :len [ /system/script/find where name=$Script ] ] > 0) do={
|
||||
$LogPrint warning $0 ("Requested to add script '" . $Script . "', but that exists already!");
|
||||
} else={
|
||||
$LogPrint info $0 ("Adding new script: " . $Script);
|
||||
/system/script/add name=$Script owner=$Script source="#!rsc by RouterOS\n" comment=$NewComment;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue