Re: Schedule reboot in *.service file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mi, 15.05.19 15:53, Jeffrey Walton (noloader@xxxxxxxxx) 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"

Lennart

--
Lennart Poettering, Berlin
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux