[package] 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 6959a8e..44361cc 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 1b6b5a4..b691ec8 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)
 }