mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-08-03 17:54:47 +02:00
global-functions: $ScriptInstallUpdate: swap conditions
This commit is contained in:
parent
fe3d582c1f
commit
d0cdad791c
1 changed files with 5 additions and 4 deletions
|
@ -668,8 +668,8 @@
|
|||
}
|
||||
|
||||
:if ([ :len $SourceNew ] > 0) do={
|
||||
:if ([ :pick $SourceNew 0 18 ] = "#!rsc by RouterOS\n") do={
|
||||
:if ($SourceNew != $ScriptVal->"source") do={
|
||||
:if ($SourceNew != $ScriptVal->"source") do={
|
||||
:if ([ :pick $SourceNew 0 18 ] = "#!rsc by RouterOS\n") do={
|
||||
:local DontRequirePermissions \
|
||||
($SourceNew~"\n# requires: dont-require-permissions=yes\n");
|
||||
$LogPrintExit2 info $0 ("Updating script: " . $ScriptVal->"name") false;
|
||||
|
@ -692,10 +692,11 @@
|
|||
}
|
||||
}
|
||||
} else={
|
||||
$LogPrintExit2 debug $0 ("Script " . $ScriptVal->"name" . " did not change.") false;
|
||||
$LogPrintExit2 warning $0 ("Looks like new script " . $ScriptVal->"name" . \
|
||||
" is not valid (missing shebang). Ignoring!") false;
|
||||
}
|
||||
} else={
|
||||
$LogPrintExit2 warning $0 ("Looks like new script " . $ScriptVal->"name" . " is not valid. Ignoring!") false;
|
||||
$LogPrintExit2 debug $0 ("Script " . $ScriptVal->"name" . " did not change.") false;
|
||||
}
|
||||
} else={
|
||||
$LogPrintExit2 debug $0 ("No update for script " . $ScriptVal->"name" . ".") false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue