[systemd-devel] Is it possible to start other service units by a service unit which was killed

Andrey Borzenkov arvidjaar at gmail.com
Sun Dec 15 09:54:10 PST 2013


В Mon, 16 Dec 2013 02:26:02 +0900
Tony Seo <tonyseo7 at gmail.com> пишет:

> Hello.
> 
> I send this mail to know whether systemd have options to solve this problem
> without socket activation.
> 
> what I have experienced situation is like:
> If I have A.service, B.service and C.service, I'd like to set [service]  in
> A.service to make others started when A.service is exited(fail, exit .. are
> not important)

For fail - see OnFailure (man systemd.unit). For clean exit I guess the
only way is to call systemctl directly. 

Why would you want to do it in case of normal exit? May be there are
other ways to achieve your goal?

> A.service------------------------------------------------------
> [service]
> ExecStart=/bin/program
> Restart=always
> -->?(I don't know that some options to start B.service and C.service)
> --------------------------------------------------------------------
> 
> So, I have checked some options in [service] manual, but I have not
> detected some options to start other units when A.service was killed.
> I really want to know that systemd have methods or options to solve my
> problem without socket activation.
> 
> Thanks



More information about the systemd-devel mailing list