mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
script-updates: allow to set dont-require-permissions=yes
This requires the new script to contain a line: # requires: dont-require-permissions=yes
This commit is contained in:
parent
28df37708c
commit
4eba04b9c4
1 changed files with 4 additions and 1 deletions
|
@ -53,8 +53,11 @@
|
||||||
:if ([ :pick $sourcenew 0 5 ] = "#!rsc") do={
|
:if ([ :pick $sourcenew 0 5 ] = "#!rsc") do={
|
||||||
:local sourcecurrent [ / system script get $script source ];
|
:local sourcecurrent [ / system script get $script source ];
|
||||||
:if ($sourcenew != $sourcecurrent) do={
|
:if ($sourcenew != $sourcecurrent) do={
|
||||||
|
:local "dont-require-permissions" \
|
||||||
|
($sourcenew~"\n# requires: dont-require-permissions=yes\n");
|
||||||
:log info ("Updating script: " . $scriptname);
|
:log info ("Updating script: " . $scriptname);
|
||||||
/ system script set owner=$scriptname source=$sourcenew $script;
|
/ system script set owner=$scriptname source=$sourcenew \
|
||||||
|
dont-require-permissions=$"dont-require-permissions" $script;
|
||||||
} else={
|
} else={
|
||||||
:log debug ("Script " . $scriptname . " did not change");
|
:log debug ("Script " . $scriptname . " did not change");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue