aboutsummaryrefslogtreecommitdiffstats
path: root/packages-update
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2019-09-02 09:39:19 +0200
committerGravatar Christian Hesse <mail@eworm.de>2019-09-02 09:39:19 +0200
commitecc281446c2908a2280568ad1e0b8c246d576c88 (patch)
treeddd6daa9dd6773a501dbc68bc253c60dcbaf3f3c /packages-update
parent166bbffe1d45e6b5f5cbf8791d952d431ddde902 (diff)
packages-update: add option to schedule reboot
Diffstat (limited to 'packages-update')
-rw-r--r--packages-update8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages-update b/packages-update
index 76bf120..8807027 100644
--- a/packages-update
+++ b/packages-update
@@ -39,6 +39,14 @@
}
}
+:put "Do you want to (s)chedule reboot instead of (r)eboot now? [s/R]";
+:if ([ :terminal inkey timeout=60 ] = 115) do={
+ / system scheduler add name="reboot-for-update" start-time=03:00:00 interval=1d \
+ on-event="/ system scheduler remove reboot-for-update; / system reboot;"
+ :log info ("Scheduled reboot for update at 03:00.");
+ :error ("Scheduled reboot.");
+}
+
:log info ("Rebooting for update.");
:delay 1s;
/ system reboot;