On Thu, May 16, 2019 at 4:50 AM Lennart Poettering
<[email protected]> wrote:
>
> On Mi, 15.05.19 15:53, Jeffrey Walton ([email protected]) wrote:
>
> > if [[ "$NEEDS_REBOOT" -eq 1 ]]
> > then
> >     echo "Scheduling reboot in 10 minutes"
> >     reboot -r 10
>
> This syntax is not understood by systemd:
>
> https://www.freedesktop.org/software/systemd/man/reboot.html#
>
> If you want to schedule some command to be invoked at some future time, use:
>
>         systemd-run --on-active=10s echo "Hello World"

Another option would be to use "shutdown -r +10", which systemctl does
understand. This will schedule a reboot via systemd-logind.
_______________________________________________
systemd-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to