[systemd-devel] Is there a way to set exit code of "systemd --system" instance?

Nils Kattenbeck nilskemail at gmail.com
Tue Sep 17 08:08:59 UTC 2024


You can use

SuccessAction=exit
FailureAction=exit
SuccessActionExitStatus=123

inside of a unit or invoke "systemctl exit 123" manually

On Tue, Sep 17, 2024, 10:00 沙包妖梦 <gongteng524702837 at gmail.com> wrote:

> I'm using "systemd --system" as PID1 inside podman container.
>  I need a way to make RestartPreventExitStatus of host service to work.
>
> Anyone ever did this?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20240917/8666256f/attachment.htm>


More information about the systemd-devel mailing list