haproxy: fix blocking reload of service
authorThomas Heil <heil@terminal-consulting.de>
Wed, 6 Oct 2010 14:15:43 +0000 (14:15 +0000)
committerThomas Heil <heil@terminal-consulting.de>
Wed, 6 Oct 2010 14:15:43 +0000 (14:15 +0000)
SVN-Revision: 23274

net/haproxy/Makefile
net/haproxy/files/haproxy.init

index 6959a8e11c62edfba50066065968cc2377ef52af..44361cca28a1d3cc996689d1c36daa9ffc6e1a83 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=haproxy
 PKG_VERSION:=1.4.8
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://haproxy.1wt.eu/download/1.4/src
index 1b6b5a49b861a05bc4c325f460e01f38610fa262..b691ec8c949c4a3ab7334c2e55d895ab369d3f17 100644 (file)
@@ -22,12 +22,10 @@ start() {
 }
 
 stop() {
-       start-stop-daemon -q -K -x $HAPROXY_BIN -p $HAPROXY_PID
-       sleep 3
-       kill -0 `cat $HAPROXY_PID` 2>/dev/null && \
-               start-stop-daemon -q -K -s KILL -x $HAPROXY_BIN -p $HAPROXY_PID
+        service_kill ${HAPROXY_BIN##*/} $HAPROXY_PID
+        rm -f $HAPROXY_PID
 }
 
 reload() {
-       $HAPROXY_BIN -f $HAPROXY_CONFIG -p $HAPROXY_PID -st $(cat $HAPROXY_PID)
+        $HAPROXY_BIN -f $HAPROXY_CONFIG -p $HAPROXY_PID -sf $(<$HAPROXY_PID)
 }