mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-10 05:04:47 +02:00
packages-update: prepare message and mention time zone
This commit is contained in:
parent
c1568a33dd
commit
237dcd7261
1 changed files with 4 additions and 2 deletions
|
@ -107,16 +107,18 @@ $ScriptLock $0;
|
||||||
/system/package/downgrade;
|
/system/package/downgrade;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:local Message ("Scheduled reboot for update between 3 AM and 4 AM local time (" . \
|
||||||
|
[ /system/clock/get time-zone-name ] . ").");
|
||||||
:if ([ $ScriptFromTerminal $0 ] = true) do={
|
:if ([ $ScriptFromTerminal $0 ] = true) do={
|
||||||
:put "Do you want to (s)chedule reboot or (r)eboot now? [s/R]";
|
:put "Do you want to (s)chedule reboot or (r)eboot now? [s/R]";
|
||||||
:if (([ /terminal/inkey timeout=60 ] % 32) = 19) do={
|
:if (([ /terminal/inkey timeout=60 ] % 32) = 19) do={
|
||||||
$Schedule;
|
$Schedule;
|
||||||
$LogPrintExit2 info $0 ("Scheduled reboot for update between 03:00 and 04:00.") true;
|
$LogPrintExit2 info $0 $Message true;
|
||||||
}
|
}
|
||||||
} else={
|
} else={
|
||||||
:if ($PackagesUpdateDeferReboot = true) do={
|
:if ($PackagesUpdateDeferReboot = true) do={
|
||||||
$Schedule;
|
$Schedule;
|
||||||
$LogPrintExit2 info $0 ("Scheduled reboot for update between 03:00 and 04:00.") true;
|
$LogPrintExit2 info $0 $Message true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue