[systemd-devel] question about system reboot and shutdown

Andrei Borzenkov arvidjaar at gmail.com
Tue Aug 8 18:04:18 UTC 2017


08.08.2017 17:03, Marek Floriańczyk пишет:
> 
> What would be the proper way to distinguish between system is going down for 
> reboot and for shutdown ?
> 

Straightforward way is to make your service WantedBy poweroff.target and
halt.target. You can then have second service WantedBy reboot.target and
kexec.target. They may even call the same binary (script) but with
different arguments.


More information about the systemd-devel mailing list