summaryrefslogtreecommitdiffstats
path: root/network/haproxy/rc.haproxy
diff options
context:
space:
mode:
author Cherife Li2010-05-12 17:43:25 +0200
committer David Somero2010-05-12 17:43:25 +0200
commit83b561e314326cc8406d1ee1836bd2fdd38a7fba (patch)
treea62edeb0dd7381ed3c12b24378fd5f3bc8e7d0f6 /network/haproxy/rc.haproxy
parentefbc060a997d6f2596a9ae2465709b3e4274cbd6 (diff)
downloadslackbuilds-83b561e314326cc8406d1ee1836bd2fdd38a7fba.tar.gz
network/haproxy: Updated for version 1.3.15.7
Diffstat (limited to 'network/haproxy/rc.haproxy')
-rw-r--r--network/haproxy/rc.haproxy24
1 files changed, 10 insertions, 14 deletions
diff --git a/network/haproxy/rc.haproxy b/network/haproxy/rc.haproxy
index 6f224d7f76..5663cc37a1 100644
--- a/network/haproxy/rc.haproxy
+++ b/network/haproxy/rc.haproxy
@@ -1,35 +1,31 @@
#!/bin/sh
#
# HAProxy daemon control script.
-#
-# This is an init script for the haproxy daemon.
-# To use haproxy, you must first set up the config file(s).
-#
-# Written for Slackware Linux by Cherife Li <cherife@dotimes.com>.
-#
+# Written for Slackware Linux by Cherife Li <cherife-#-dotimes.com>.
-Bin=/usr/sbin/haproxy
-CfgFile=/etc/haproxy/haproxy.cfg
-PIDFile=/var/run/haproxy.pid
+BIN=/usr/sbin/haproxy
+CONF=/etc/haproxy/haproxy.cfg
+PID=/var/run/haproxy.pid
case "$1" in
check)
echo "Checking HAProxy configuration file..."
- $Bin -f $CfgFile -cV
+ $BIN -f $CONF -cV
;;
start)
echo "Starting HAProxy..."
- $Bin -f $CfgFile -D -p $PIDFile
+ $BIN -f $CONF -D -p $PID
;;
stop)
echo "Shutting down HAProxy..."
- kill -TERM `cat $PIDFile`
- rm -f $PIDFile
+ kill -TERM `cat $PID`
+ rm -f $PID &> /dev/null
;;
restart)
stop
+ sleep 2
start
;;
*)
- echo "usage $0 {check|start|stop|restart}"
+ echo "usage `basename $0` {check|start|stop|restart}"
esac