aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions
diff options
context:
space:
mode:
Diffstat (limited to 'global-functions')
-rw-r--r--global-functions9
1 files changed, 5 insertions, 4 deletions
diff --git a/global-functions b/global-functions
index 4b495d9..7dddb50 100644
--- a/global-functions
+++ b/global-functions
@@ -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;