[systemd-devel] System halt on service stop

Lennart Poettering lennart at poettering.net
Thu Jan 8 05:14:23 PST 2015

On Wed, 07.01.15 19:00, Albert Strasheim (fullung at gmail.com) wrote:

> Hello all
> I'd like to find a clean way to halt a systemd system (actually, a
> Docker container) when a "main" service stops (not just on failure).
> I tried Conflicts=systemd-halt.service and calling shutdown from
> ExecStopPost= but it seems both cause problems, since I end up with a
> "stop job" for my service that takes 90 seconds to time out, instead
> of taking down the system immediately.


"ExecStopPost=/usr/bin/systemctl --no-block poweroff"


Lennart Poettering, Red Hat

More information about the systemd-devel mailing list