mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-07-09 02:41:33 +00:00
Compare commits
No commits in common. "228ac39486e875abbebad44059aed0cc7bd24a7d" and "b7a5402be62bb59eb9d0400f21f30462508cca0c" have entirely different histories.
228ac39486
...
b7a5402be6
20 changed files with 59 additions and 75 deletions
Binary file not shown.
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.6 KiB |
|
|
@ -57,12 +57,11 @@ temporarily.
|
||||||
|
|
||||||
#### Prerequisite configuration
|
#### Prerequisite configuration
|
||||||
|
|
||||||
The
|
Starting with RouterOS 7.17 the
|
||||||
[device-mode ↗️](https://help.mikrotik.com/docs/spaces/ROS/pages/93749258/Device-mode)
|
[device-mode ↗️](https://help.mikrotik.com/docs/spaces/ROS/pages/93749258/Device-mode)
|
||||||
is a mechanism to lock down a device for security reasons, it gives
|
has been extended to give more fine-grained control over what features are
|
||||||
fine-grained control over what features are available. You need to enable
|
available. You need to enable `scheduler` and `fetch` at least, specific
|
||||||
`scheduler` and `fetch` at least, specific scripts may require additional
|
scripts may require additional features.
|
||||||
features.
|
|
||||||
|
|
||||||
### Hardware
|
### Hardware
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,5 +32,5 @@
|
||||||
:set ($Seen->$Mac) 1;
|
:set ($Seen->$Mac) 1;
|
||||||
}
|
}
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError [ :jobname ] $Err;
|
:global ExitError; $ExitError false [ :jobname ] $Err;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,5 +32,5 @@
|
||||||
:set ($Seen->$Mac) 1;
|
:set ($Seen->$Mac) 1;
|
||||||
}
|
}
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError [ :jobname ] $Err;
|
:global ExitError; $ExitError false [ :jobname ] $Err;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,5 +41,5 @@
|
||||||
:set ($Seen->$Mac) 1;
|
:set ($Seen->$Mac) 1;
|
||||||
}
|
}
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError [ :jobname ] $Err;
|
:global ExitError; $ExitError false [ :jobname ] $Err;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,5 +32,5 @@
|
||||||
:set ($Seen->$Mac) 1;
|
:set ($Seen->$Mac) 1;
|
||||||
}
|
}
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError [ :jobname ] $Err;
|
:global ExitError; $ExitError false [ :jobname ] $Err;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,14 +30,12 @@
|
||||||
:global CharacterReplace;
|
:global CharacterReplace;
|
||||||
:global CleanFilePath;
|
:global CleanFilePath;
|
||||||
:global CleanName;
|
:global CleanName;
|
||||||
:global CommitBrief;
|
|
||||||
:global DeviceInfo;
|
:global DeviceInfo;
|
||||||
:global Dos2Unix;
|
:global Dos2Unix;
|
||||||
:global DownloadPackage;
|
:global DownloadPackage;
|
||||||
:global EitherOr;
|
:global EitherOr;
|
||||||
:global EscapeForRegEx;
|
:global EscapeForRegEx;
|
||||||
:global ExitError;
|
:global ExitError;
|
||||||
:global ExitOnError;
|
|
||||||
:global FetchHuge;
|
:global FetchHuge;
|
||||||
:global FetchUserAgentStr;
|
:global FetchUserAgentStr;
|
||||||
:global FileExists;
|
:global FileExists;
|
||||||
|
|
@ -321,24 +319,13 @@
|
||||||
:return $Return;
|
:return $Return;
|
||||||
}
|
}
|
||||||
|
|
||||||
# return a brief commit description
|
|
||||||
:set CommitBrief do={
|
|
||||||
:global CommitId;
|
|
||||||
:global CommitInfo;
|
|
||||||
|
|
||||||
:if ($CommitId = "unknown") do={
|
|
||||||
:return "unknown";
|
|
||||||
}
|
|
||||||
|
|
||||||
:return ($CommitInfo . "/" . [ :pick $CommitId 0 8 ]);
|
|
||||||
}
|
|
||||||
|
|
||||||
# get readable device info
|
# get readable device info
|
||||||
:set DeviceInfo do={
|
:set DeviceInfo do={
|
||||||
|
:global CommitId;
|
||||||
|
:global CommitInfo;
|
||||||
:global ExpectedConfigVersion;
|
:global ExpectedConfigVersion;
|
||||||
:global Identity;
|
:global Identity;
|
||||||
|
|
||||||
:global CommitBrief;
|
|
||||||
:global IfThenElse;
|
:global IfThenElse;
|
||||||
:global FormatLine;
|
:global FormatLine;
|
||||||
|
|
||||||
|
|
@ -379,7 +366,8 @@
|
||||||
$RouterBoard->"current-firmware" != $RouterBoard->"upgrade-firmware") \
|
$RouterBoard->"current-firmware" != $RouterBoard->"upgrade-firmware") \
|
||||||
([ $FormatLine " Firmware" ($RouterBoard->"current-firmware") ] . "\n") ] . \
|
([ $FormatLine " Firmware" ($RouterBoard->"current-firmware") ] . "\n") ] . \
|
||||||
"RouterOS-Scripts:\n" . \
|
"RouterOS-Scripts:\n" . \
|
||||||
[ $FormatLine " Commit" [ $CommitBrief ] ] . "\n" . \
|
[ $IfThenElse ($CommitId != "unknown") \
|
||||||
|
([ $FormatLine " Commit" ($CommitInfo . "/" . [ :pick $CommitId 0 8 ]) ] . "\n") ] . \
|
||||||
[ $FormatLine " Version" $ExpectedConfigVersion ]);
|
[ $FormatLine " Version" $ExpectedConfigVersion ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -485,30 +473,20 @@
|
||||||
:return $Return;
|
:return $Return;
|
||||||
}
|
}
|
||||||
|
|
||||||
# wrapper for $ExitOnError with additional parameter
|
# simple macro to print error message on unintentional error
|
||||||
:set ExitError do={
|
:set ExitError do={
|
||||||
:local ExitOK [ :tostr $1 ];
|
:local ExitOK [ :tostr $1 ];
|
||||||
:local Name [ :tostr $2 ];
|
:local Name [ :tostr $2 ];
|
||||||
:local Error [ :tostr $3 ];
|
:local Error [ :tostr $3 ];
|
||||||
|
|
||||||
:global ExitOnError;
|
|
||||||
|
|
||||||
:if ($ExitOK = "false") do={
|
|
||||||
$ExitOnError $Name $Error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# simple macro to print error message on unintentional error
|
|
||||||
:set ExitOnError do={
|
|
||||||
:local Name [ :tostr $1 ];
|
|
||||||
:local Error [ :tostr $2 ];
|
|
||||||
|
|
||||||
:global IfThenElse;
|
:global IfThenElse;
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
|
|
||||||
$LogPrint error $Name ([ $IfThenElse ([ :pick $Name 0 1 ] = "\$") \
|
:if ($ExitOK = "false") do={
|
||||||
"Function" "Script" ] . " '" . $Name . "' exited with error" . \
|
$LogPrint error $Name ([ $IfThenElse ([ :pick $Name 0 1 ] = "\$") \
|
||||||
[ $IfThenElse (!($Error ~ "^(|true|false)\$")) (": " . $Error) "." ]);
|
"Function" "Script" ] . " '" . $Name . "' exited with error" . \
|
||||||
|
[ $IfThenElse (!($Error ~ "^(|true|false)\$")) (": " . $Error) "." ]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# fetch huge data to file, read in chunks
|
# fetch huge data to file, read in chunks
|
||||||
|
|
@ -572,13 +550,16 @@
|
||||||
:set FetchUserAgentStr do={
|
:set FetchUserAgentStr do={
|
||||||
:local Caller [ :tostr $1 ];
|
:local Caller [ :tostr $1 ];
|
||||||
|
|
||||||
:global CommitBrief;
|
:global CommitId;
|
||||||
|
:global CommitInfo;
|
||||||
|
|
||||||
:global IfThenElse;
|
:global IfThenElse;
|
||||||
|
|
||||||
:local Resource [ /system/resource/get ];
|
:local Resource [ /system/resource/get ];
|
||||||
|
|
||||||
:return ("User-Agent: Mikrotik/" . $Resource->"version" . " " . $Resource->"architecture-name" . \
|
:return ("User-Agent: Mikrotik/" . $Resource->"version" . " " . $Resource->"architecture-name" . \
|
||||||
" " . $Caller . "/Fetch (https://rsc.eworm.de/; " . [ $CommitBrief ] . ")");
|
" " . $Caller . "/Fetch (https://rsc.eworm.de/" . [ $IfThenElse ($CommitId != "unknown") \
|
||||||
|
("; " . $CommitInfo . "/" . [ :pick $CommitId 0 8 ]) ] . ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
# check for existence of file, optionally with type
|
# check for existence of file, optionally with type
|
||||||
|
|
@ -1043,6 +1024,7 @@
|
||||||
|
|
||||||
# return an IPv6 netmask for CIDR
|
# return an IPv6 netmask for CIDR
|
||||||
:set NetMask6 do={
|
:set NetMask6 do={
|
||||||
|
:local FuncName $0;
|
||||||
:local CIDR [ :tostr $1 ];
|
:local CIDR [ :tostr $1 ];
|
||||||
|
|
||||||
:global IfThenElse;
|
:global IfThenElse;
|
||||||
|
|
@ -1259,6 +1241,7 @@
|
||||||
:local NewComment [ :tostr $2 ];
|
:local NewComment [ :tostr $2 ];
|
||||||
|
|
||||||
:global CommitId;
|
:global CommitId;
|
||||||
|
:global CommitInfo;
|
||||||
:global ExpectedConfigVersion;
|
:global ExpectedConfigVersion;
|
||||||
:global GlobalConfigReady;
|
:global GlobalConfigReady;
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
|
|
@ -1434,6 +1417,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:if ($CommitId != "unknown" && $CommitIdBefore != $CommitId) do={
|
||||||
|
$LogPrint info $0 ("Updated to commit: " . $CommitInfo . "/" . [ :pick $CommitId 0 8 ]);
|
||||||
|
}
|
||||||
|
|
||||||
:if ($ExpectedConfigVersionBefore > $ExpectedConfigVersion) do={
|
:if ($ExpectedConfigVersionBefore > $ExpectedConfigVersion) do={
|
||||||
$LogPrint warning $0 ("The configuration version decreased from " . \
|
$LogPrint warning $0 ("The configuration version decreased from " . \
|
||||||
$ExpectedConfigVersionBefore . " to " . $ExpectedConfigVersion . \
|
$ExpectedConfigVersionBefore . " to " . $ExpectedConfigVersion . \
|
||||||
|
|
@ -1530,7 +1517,7 @@
|
||||||
:set GlobalConfigMigration;
|
:set GlobalConfigMigration;
|
||||||
}
|
}
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError $0 $Err;
|
:global ExitError; $ExitError false $0 $Err;
|
||||||
} }
|
} }
|
||||||
|
|
||||||
# lock script against multiple invocation
|
# lock script against multiple invocation
|
||||||
|
|
@ -1676,7 +1663,7 @@
|
||||||
|
|
||||||
$SendNotification2 ({ origin=$0; subject=$1; message=$2; link=$3; silent=$4 });
|
$SendNotification2 ({ origin=$0; subject=$1; message=$2; link=$3; silent=$4 });
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError $0 $Err;
|
:global ExitError; $ExitError false $0 $Err;
|
||||||
} }
|
} }
|
||||||
|
|
||||||
# send notification via NotificationFunctions - expects one array argument
|
# send notification via NotificationFunctions - expects one array argument
|
||||||
|
|
@ -1934,20 +1921,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
# add (and fix) global scripts scheduler
|
# add (and fix) global scripts scheduler
|
||||||
/system/scheduler {
|
:local OnEvent "/system/script { run global-config; run global-functions; }";
|
||||||
:local OnEvent "/system/script { run global-config; run global-functions; }";
|
:if ([ :len [ /system/scheduler/find where name="global-scripts" ] ] = 0) do={
|
||||||
:if ([ :len [ find where name="global-scripts" ] ] = 0) do={
|
/system/scheduler/add name="global-scripts" start-time=startup;
|
||||||
add name="global-scripts" start-time=startup;
|
}
|
||||||
}
|
:if ([ /system/scheduler/get "global-scripts" on-event ] != $OnEvent) do={
|
||||||
set on-event=$OnEvent [ find where name="global-scripts" on-event!=$OnEvent ];
|
/system/scheduler/set "global-scripts" on-event=$OnEvent;
|
||||||
enable [ find where name="global-scripts" disabled ];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Log success
|
# Log success
|
||||||
:local Resource [ /system/resource/get ];
|
:local Resource [ /system/resource/get ];
|
||||||
$LogPrintOnce info $ScriptName ("Loaded " . \
|
$LogPrintOnce info $ScriptName ("Loaded on " . $Resource->"board-name" . \
|
||||||
[ $IfThenElse ($CommitId != "unknown") ([ $CommitBrief ] . " ") ] . \
|
" with RouterOS " . $Resource->"version" . ".");
|
||||||
"on " . $Resource->"board-name" . " with RouterOS " . $Resource->"version" . ".");
|
|
||||||
|
|
||||||
# signal we are ready
|
# signal we are ready
|
||||||
:set GlobalFunctionsReady true;
|
:set GlobalFunctionsReady true;
|
||||||
|
|
|
||||||
|
|
@ -66,5 +66,5 @@
|
||||||
/interface/ethernet/enable $InterfaceReEnable;
|
/interface/ethernet/enable $InterfaceReEnable;
|
||||||
}
|
}
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError $0 $Err;
|
:global ExitError; $ExitError false $0 $Err;
|
||||||
} }
|
} }
|
||||||
|
|
|
||||||
|
|
@ -75,5 +75,5 @@
|
||||||
/interface/ethernet/enable $InterfaceReEnable;
|
/interface/ethernet/enable $InterfaceReEnable;
|
||||||
}
|
}
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError $0 $Err;
|
:global ExitError; $ExitError false $0 $Err;
|
||||||
} }
|
} }
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
:put [ :tocrlf [ $InspectVarReturn $1 ] ];
|
:put [ :tocrlf [ $InspectVarReturn $1 ] ];
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError $0 $Err;
|
:global ExitError; $ExitError false $0 $Err;
|
||||||
} }
|
} }
|
||||||
|
|
||||||
# inspect variable and return formatted string
|
# inspect variable and return formatted string
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
[ $FormatLine "HostMax" ($Values->"hostmax") ] . "\n" . \
|
[ $FormatLine "HostMax" ($Values->"hostmax") ] . "\n" . \
|
||||||
[ $FormatLine "Broadcast" ($Values->"broadcast") ]) ];
|
[ $FormatLine "Broadcast" ($Values->"broadcast") ]) ];
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError $0 $Err;
|
:global ExitError; $ExitError false $0 $Err;
|
||||||
} }
|
} }
|
||||||
|
|
||||||
# calculate and return netmask, network, min host, max host and broadcast
|
# calculate and return netmask, network, min host, max host and broadcast
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,7 @@
|
||||||
/system/scheduler/set interval=(($SchedVal->"run-count") . "m") \
|
/system/scheduler/set interval=(($SchedVal->"run-count") . "m") \
|
||||||
comment="Waiting for retry..." $Scheduler;
|
comment="Waiting for retry..." $Scheduler;
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError $0 $Err;
|
:global ExitError; $ExitError false $0 $Err;
|
||||||
} }
|
} }
|
||||||
|
|
||||||
# generate filter for log-forward
|
# generate filter for log-forward
|
||||||
|
|
@ -274,7 +274,7 @@
|
||||||
|
|
||||||
$SendEMail2 ({ origin=$0; subject=$1; message=$2; link=$3 });
|
$SendEMail2 ({ origin=$0; subject=$1; message=$2; link=$3 });
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError $0 $Err;
|
:global ExitError; $ExitError false $0 $Err;
|
||||||
} }
|
} }
|
||||||
|
|
||||||
# send notification via e-mail - expects one array argument
|
# send notification via e-mail - expects one array argument
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@
|
||||||
:set GotifyQueue;
|
:set GotifyQueue;
|
||||||
}
|
}
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError $0 $Err;
|
:global ExitError; $ExitError false $0 $Err;
|
||||||
} }
|
} }
|
||||||
|
|
||||||
# send notification via Gotify - expects one array argument
|
# send notification via Gotify - expects one array argument
|
||||||
|
|
@ -126,7 +126,7 @@
|
||||||
|
|
||||||
$SendGotify2 ({ origin=$0; subject=$1; message=$2; link=$3; silent=$4 });
|
$SendGotify2 ({ origin=$0; subject=$1; message=$2; link=$3; silent=$4 });
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError $0 $Err;
|
:global ExitError; $ExitError false $0 $Err;
|
||||||
} }
|
} }
|
||||||
|
|
||||||
# send notification via Gotify - expects one array argument
|
# send notification via Gotify - expects one array argument
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@
|
||||||
:set MatrixQueue;
|
:set MatrixQueue;
|
||||||
}
|
}
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError $0 $Err;
|
:global ExitError; $ExitError false $0 $Err;
|
||||||
} }
|
} }
|
||||||
|
|
||||||
# send notification via Matrix - expects one array argument
|
# send notification via Matrix - expects one array argument
|
||||||
|
|
@ -172,7 +172,7 @@
|
||||||
|
|
||||||
$SendMatrix2 ({ origin=$0; subject=$1; message=$2; link=$3 });
|
$SendMatrix2 ({ origin=$0; subject=$1; message=$2; link=$3 });
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError $0 $Err;
|
:global ExitError; $ExitError false $0 $Err;
|
||||||
} }
|
} }
|
||||||
|
|
||||||
# send notification via Matrix - expects one array argument
|
# send notification via Matrix - expects one array argument
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
:set NtfyQueue;
|
:set NtfyQueue;
|
||||||
}
|
}
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError $0 $Err;
|
:global ExitError; $ExitError false $0 $Err;
|
||||||
} }
|
} }
|
||||||
|
|
||||||
# send notification via ntfy - expects one array argument
|
# send notification via ntfy - expects one array argument
|
||||||
|
|
@ -148,7 +148,7 @@
|
||||||
|
|
||||||
$SendNtfy2 ({ origin=$0; subject=$1; message=$2; link=$3; silent=$4 });
|
$SendNtfy2 ({ origin=$0; subject=$1; message=$2; link=$3; silent=$4 });
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError $0 $Err;
|
:global ExitError; $ExitError false $0 $Err;
|
||||||
} }
|
} }
|
||||||
|
|
||||||
# send notification via ntfy - expects one array argument
|
# send notification via ntfy - expects one array argument
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@
|
||||||
:set TelegramQueue;
|
:set TelegramQueue;
|
||||||
}
|
}
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError $0 $Err;
|
:global ExitError; $ExitError false $0 $Err;
|
||||||
} }
|
} }
|
||||||
|
|
||||||
# get the chat id
|
# get the chat id
|
||||||
|
|
@ -101,7 +101,7 @@
|
||||||
$LogPrint info $0 ("The thread id is: " . ($Message->"message_thread_id"));
|
$LogPrint info $0 ("The thread id is: " . ($Message->"message_thread_id"));
|
||||||
}
|
}
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError $0 $Err;
|
:global ExitError; $ExitError false $0 $Err;
|
||||||
} }
|
} }
|
||||||
|
|
||||||
# send notification via telegram - expects one array argument
|
# send notification via telegram - expects one array argument
|
||||||
|
|
@ -237,7 +237,7 @@
|
||||||
|
|
||||||
$SendTelegram2 ({ origin=$0; subject=$1; message=$2; link=$3; silent=$4 });
|
$SendTelegram2 ({ origin=$0; subject=$1; message=$2; link=$3; silent=$4 });
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError $0 $Err;
|
:global ExitError; $ExitError false $0 $Err;
|
||||||
} }
|
} }
|
||||||
|
|
||||||
# send notification via telegram - expects one array argument
|
# send notification via telegram - expects one array argument
|
||||||
|
|
|
||||||
|
|
@ -52,5 +52,5 @@
|
||||||
:return true;
|
:return true;
|
||||||
}
|
}
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError $0 $Err;
|
:global ExitError; $ExitError false $0 $Err;
|
||||||
} }
|
} }
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@
|
||||||
:return false;
|
:return false;
|
||||||
}
|
}
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError $0 $Err;
|
:global ExitError; $ExitError false $0 $Err;
|
||||||
} }
|
} }
|
||||||
|
|
||||||
# import keys from a file
|
# import keys from a file
|
||||||
|
|
@ -110,5 +110,5 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError $0 $Err;
|
:global ExitError; $ExitError false $0 $Err;
|
||||||
} }
|
} }
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@
|
||||||
$LogPrint info $FuncName ("No action defined for " . $Count . " mode-button presses.");
|
$LogPrint info $FuncName ("No action defined for " . $Count . " mode-button presses.");
|
||||||
}
|
}
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError $0 $Err;
|
:global ExitError; $ExitError false $0 $Err;
|
||||||
} }
|
} }
|
||||||
/system/scheduler/add name="_ModeButtonScheduler" \
|
/system/scheduler/add name="_ModeButtonScheduler" \
|
||||||
on-event=":global ModeButtonScheduler; \$ModeButtonScheduler;" interval=3s;
|
on-event=":global ModeButtonScheduler; \$ModeButtonScheduler;" interval=3s;
|
||||||
|
|
@ -91,5 +91,5 @@
|
||||||
/system/scheduler/set $Scheduler start-time=[ /system/clock/get time ];
|
/system/scheduler/set $Scheduler start-time=[ /system/clock/get time ];
|
||||||
}
|
}
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError [ :jobname ] $Err;
|
:global ExitError; $ExitError false [ :jobname ] $Err;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue