Short version: How can I get a systemd controlled service to trigger an immediate shutdown?
I have a daemon empowered to do arbitrary things in response to certain events via a (fork/exec'd) shell script ending with
exec halt -p
Or more specifically,
exec $@, but in this case
halt -p. I've also tried:
While this works, there seems to be a problem that causes the shutdown, which would normally only take a few seconds, to take several minutes. I suspect it is because systemd is waiting on a child process of a service (the
halt itself) that doesn't politely die upon request. I.e., it is sort of a snake chasing its own tail scenario.
The service has no
ExecStop and is