mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
packages-update: rename scheduler to match function name
This commit is contained in:
@ -39,7 +39,7 @@ $ScriptLock $0;
|
||||
|
||||
$WaitFullyConnected;
|
||||
|
||||
:if ([ :len [ /system/scheduler/find where name="reboot-for-update" ] ] > 0) do={
|
||||
:if ([ :len [ /system/scheduler/find where name="\$RebootForUpdate" ] ] > 0) do={
|
||||
:error "A reboot for update is already scheduled.";
|
||||
}
|
||||
|
||||
|
@ -86,8 +86,8 @@ $ScriptLock $0;
|
||||
$RandomDelay 3600;
|
||||
/system/reboot;
|
||||
}
|
||||
/system/scheduler/add name="reboot-for-update" start-time=03:00:00 interval=1d \
|
||||
on-event=("/system/scheduler/remove reboot-for-update; " . \
|
||||
/system/scheduler/add name="\$RebootForUpdate" start-time=03:00:00 interval=1d \
|
||||
on-event=("/system/scheduler/remove \"\\\$RebootForUpdate\"; " . \
|
||||
":global RebootForUpdate; \$RebootForUpdate;");
|
||||
$LogPrintExit2 info $0 ("Scheduled reboot for update between 03:00 and 04:00.") true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user