[systemd-devel] Non-target, dependency-only unit
Pablo Nehab Hess
pablo at hess.net.br
Mon Jan 16 09:00:18 PST 2012
I'm trying to convert Spacewalk's init script to a systemd unit file.
Spacewalk is merely a collection of dependencies; it depends on
{httpd,tomcat6,postgresql}.service and a few others, but there's no
proper daemon or any such thing. The original init script lives at
'/usr/sbin/spacewalk-service' and simply performs 'start' or 'stop' or
'restart'/'reload' for all those dependencies in a specific order.
If the only desirable action was 'start', then a target unit would be just fine.
However, the administrator must be able to at the very least 'stop'
and 'reload'/'restart' it.
The solution I've been using is inserting all but the last dependency
into 'ExecStartPre' and 'ExecStopPost' directives, but does *not* look
correct to me.
Is there any other solution I'm unaware of?
Thanks for any hints.
--
Pablo Nehab Hess
http://about.me/phess
pablo at hess.net.br
More information about the systemd-devel
mailing list