diff -Nru haproxy-1.5.4/debian/changelog haproxy-1.5.4/debian/changelog
--- haproxy-1.5.4/debian/changelog 2015-08-23 20:45:27.000000000 +0200
+++ haproxy-1.5.4/debian/changelog 2015-09-17 11:27:25.000000000 +0200
@@ -1,3 +1,11 @@
+haproxy (1.5.4-1ubuntu2.1~ubuntu14.04.2) trusty-backports; urgency=medium
+
+ * Fix failure to stop service.
+ - SysVinit script used --pid option of start-stop-daemon which is
+ not available in Trusty. (LP: #1494141)
+
+ -- Louis Bouchard <louis.bouchard@ubuntu.com> Thu, 17 Sep 2015 11:25:30 +0200
+
haproxy (1.5.4-1ubuntu2.1~ubuntu14.04.1) trusty-backports; urgency=medium
* No-change backport to trusty (LP: #1473162)
diff -Nru haproxy-1.5.4/debian/haproxy.init haproxy-1.5.4/debian/haproxy.init
--- haproxy-1.5.4/debian/haproxy.init 2015-06-08 22:52:11.000000000 +0200
+++ haproxy-1.5.4/debian/haproxy.init 2015-09-17 11:21:58.000000000 +0200
@@ -29,6 +29,12 @@
[ -f /etc/default/rcS ] && . /etc/default/rcS
. /lib/lsb/init-functions
+trap clean EXIT
+
+clean()
+{
+rm -f $tmp
+}
check_haproxy_config()
{
@@ -61,10 +67,13 @@
fi
ret=0
+ tmp=$(tempfile -s .haproxy.init)
for pid in $(cat $PIDFILE); do
+ echo $pid > $tmp
start-stop-daemon --quiet --oknodo --stop \
- --retry 5 --pid $pid --exec $HAPROXY || ret=$?
+ --retry 5 --pidfile $tmp --exec $HAPROXY || ret=$?
done
+ rm -f $tmp
[ $ret -eq 0 ] && rm -f $PIDFILE