[systemd-devel] Non-target, dependency-only unit

Pablo Hess natunobilis at gentoobr.org
Mon Jan 16 10:54:33 PST 2012


> [Service]
> Type=oneshot
> ExecStart=/usr/sbin/spacewalk-service start
> ExecReload=/usr/sbin/spacewalk-service reload
> ExecStop=/usr/sbin/spacewalk-service stop
> RemainAfterExit=yes

Thank you, Jóhann.

Yes, this unit file is a simple solution, but I was looking for
something with more of a native approach.

One of the obnoxious things about the wrapper script is that it waits
until tomcat has opened its socket:

while [ -f "/var/run/$TOMCAT.pid" ] ; do
       /usr/sbin/lsof -t -i TCP:8009 -p $(cat /var/run/$TOMCAT.pid) >
/dev/null && break
       sleep 1
done

If only there was some way to ensure the socket was really open
(within tomcat's unit file, I believe), the whole ExecStartPre and
ExetStopPost structure might work out fine.

--
Pablo Nehab Hess
http://about.me/phess


More information about the systemd-devel mailing list