Re: [systemd-devel] Cleanest way to halt a VM after a service has stopped

2018-02-27 Thread Lennart Poettering
On Mo, 26.02.18 15:54, Filipe Brandenburger (filbran...@google.com) wrote:

> Hi,
> 
> I found it's possible to halt a VM after a service has stopped by
> using something like this:
> 
> ExecStopPost=/sbin/halt -p
> 
> Is this the cleanest approach? Or would anyone have a better
> recommendation (perhaps using systemd-halt.service or similar)?

There's FailureAction= and SuccessAction=. Set both to "poweroff". See
systemd.unit(5) for details.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Cleanest way to halt a VM after a service has stopped

2018-02-26 Thread Filipe Brandenburger
Hi,

I found it's possible to halt a VM after a service has stopped by
using something like this:

ExecStopPost=/sbin/halt -p

Is this the cleanest approach? Or would anyone have a better
recommendation (perhaps using systemd-halt.service or similar)?

Thanks!
Filipe


smime.p7s
Description: S/MIME Cryptographic Signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel