diff -Nru haproxy-1.5.10/debian/changelog haproxy-1.5.10/debian/changelog --- haproxy-1.5.10/debian/changelog 2015-07-06 22:21:57.000000000 +0200 +++ haproxy-1.5.10/debian/changelog 2015-12-08 17:31:41.000000000 +0100 @@ -1,3 +1,11 @@ +haproxy (1.5.10-1ubuntu0.2) vivid; urgency=medium + + * Ensure that haproxy processes are terminated correctly when executing + stop/restart operations, easing backports to pre-systemd versions of + Ubuntu (LP: #1481737). + + -- Louis Bouchard Tue, 08 Dec 2015 17:30:11 +0100 + haproxy (1.5.10-1ubuntu0.1) vivid-security; urgency=medium * SECURITY UPDATE: information disclosure via uninitialized memory diff -Nru haproxy-1.5.10/debian/haproxy.init haproxy-1.5.10/debian/haproxy.init --- haproxy-1.5.10/debian/haproxy.init 2015-01-04 13:18:29.000000000 +0100 +++ haproxy-1.5.10/debian/haproxy.init 2015-12-08 17:26:51.000000000 +0100 @@ -29,6 +29,13 @@ [ -f /etc/default/rcS ] && . /etc/default/rcS . /lib/lsb/init-functions +tmp_pidfile=$(tempfile -s .haproxy.init) + +clean() +{ + rm -f $tmp_pidfile +} +trap clean EXIT check_haproxy_config() { @@ -62,8 +69,9 @@ ret=0 for pid in $(cat $PIDFILE); do - start-stop-daemon --quiet --oknodo --stop \ - --retry 5 --pid $pid --exec $HAPROXY || ret=$? + echo $pid > $tmp_pidfile + start-stop-daemon --quiet --oknodo --stop \ + --retry 5 --pidfile $tmp_pidfile --exec $HAPROXY || ret=$? done [ $ret -eq 0 ] && rm -f $PIDFILE