Files
ols-ucentral-schema/command/cmd_reboot.uc
John Crispin e30b05f369 propagate reboot_cause
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-16 14:05:50 +02:00

12 lines
242 B
Ucode

log("Initiating reboot");
include('reboot_cause.uc', { reason: 'reboot' });
system("(sleep 10; reboot)&");
system("/etc/init.d/ucentral stop");
let err = ctx.error();
if (err != null)
result(2, "Reboot call failed with status %s", err);