mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-07-30 13:11:36 +00:00
Compare commits
3 commits
03eef94c06
...
2a5da14d80
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a5da14d80 | ||
|
|
230d3421d3 | ||
|
|
ba584e23a7 |
2 changed files with 2 additions and 11 deletions
|
|
@ -1336,14 +1336,6 @@
|
|||
:local ScriptInfo [ $ParseKeyValueStore ($ScriptVal->"comment") ];
|
||||
:local SourceNew;
|
||||
|
||||
:foreach Scheduler in=[ /system/scheduler/find where on-event~("\\b" . $ScriptVal->"name" . "\\b") ] do={
|
||||
:local SchedulerVal [ /system/scheduler/get $Scheduler ];
|
||||
:if ($ScriptVal->"policy" != $SchedulerVal->"policy") do={
|
||||
$LogPrint warning $0 ("Policies differ for script '" . $ScriptVal->"name" . \
|
||||
"' and its scheduler '" . $SchedulerVal->"name" . "'!");
|
||||
}
|
||||
}
|
||||
|
||||
:do {
|
||||
:if ($ScriptInfo->"ignore" = true) do={
|
||||
$LogPrint debug $0 ("Ignoring script '" . $ScriptVal->"name" . "', as requested.");
|
||||
|
|
@ -1449,9 +1441,7 @@
|
|||
/system/script/set owner=($ScriptVal->"name") policy=($ScriptVal->"policy") \
|
||||
dont-require-permissions=($ScriptVal->"dont-require-permissions") \
|
||||
source=[ $IfThenElse ($ScriptUpdatesCRLF = true) $SourceCRLF $SourceNew ] $Script;
|
||||
:if ($ScriptVal->"name" = "global-config" || \
|
||||
$ScriptVal->"name" = "global-functions" || \
|
||||
$ScriptVal->"name" ~ ("^(global-functions\\.d|mod)/.")) do={
|
||||
:if ($ScriptVal->"name" ~ ("^(global-config|global-functions(\\.d/.+)?|mod/.+)\$")) do={
|
||||
:set ReloadGlobal true;
|
||||
}
|
||||
} on-error={ }
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
#
|
||||
# requires RouterOS, version=7.21
|
||||
# requires device-mode, scheduler
|
||||
# requires policy, dont-require-permissions
|
||||
#
|
||||
# act on multiple mode and reset button presses
|
||||
# https://rsc.eworm.de/doc/mode-button.md
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue