On Mon, 16.01.12 16:54, Pablo Hess ([email protected]) wrote:

> > [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

Wow, that's evil. Normally tomcat should not return from its
initialization before the socket is successfully created. It's really
bad style having sleep loops like this.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to