[Pkg-haproxy-maintainers] Bug#804530: Bug#804530: Bug#804530: haproxy: Ensure stop action works on pre-systemd versions of Debian (and Ubuntu)

Vincent Bernat bernat at debian.org
Mon Nov 9 12:13:18 UTC 2015


 ❦  9 novembre 2015 11:51 GMT, James Page <james.page at ubuntu.com> :

> How would you feel about using:
>
> for pid in $(cat $PIDFILE); do
> if start-stop-daemon --help | grep -q "\-\-pid "; then
> start-stop-daemon --quiet --oknodo --stop \
> --retry 5 --pid $pid --exec $HAPROXY || ret=$?
> else
> if kill -0 $pid 2> /dev/null; then
> /bin/kill $pid || ret=4
> fi
> fi
> done
>
> This would preserve use of stop-start-daemon if the version installed
> supported --pid, and drop back to the kill approach if not.

Personally, I find this too hacky and not worth it. For example, if
start-stop-daemon sends its output to stderr (unlikely, but...), this
will break. Or if start-stop-daemon reduces its help message to only a
mention of the manual page.

Apollon, what do you think?
-- 
If one cannot enjoy reading a book over and over again, there is no use
in reading it at all.
		-- Oscar Wilde
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-haproxy-maintainers/attachments/20151109/169e9168/attachment.sig>


More information about the Pkg-haproxy-maintainers mailing list