]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/initscripts/packages/haproxy
update Tor to 0.3.5.8
[people/pmueller/ipfire-2.x.git] / src / initscripts / packages / haproxy
1 #!/bin/sh
2 ########################################################################
3 # Begin $rc_base/init.d/haproxy
4 #
5 # Description : HAProxy init script
6 #
7 ########################################################################
8
9 . /etc/sysconfig/rc
10 . ${rc_functions}
11
12 case "${1}" in
13 start)
14 boot_mesg "Starting HAProxy..."
15 loadproc /usr/sbin/haproxy -D -f /etc/haproxy/haproxy.cfg \
16 -p /var/run/haproxy.pid
17 ;;
18
19 stop)
20 boot_mesg "Stopping HAProxy..."
21 killproc /usr/sbin/haproxy
22 ;;
23
24 reload)
25 boot_mesg "Reloading HAProxy..."
26 /usr/sbin/haproxy -D -f /etc/haproxy/haproxy.cfg \
27 -p /var/run/haproxy.pid -sf $(cat /var/run/haproxy.pid)
28 evaluate_retval
29 ;;
30
31 restart)
32 ${0} stop
33 sleep 1
34 ${0} start
35 ;;
36
37 status)
38 statusproc /usr/sbin/haproxy
39 ;;
40
41 *)
42 echo "Usage: ${0} {start|stop|reload|restart|status}"
43 exit 1
44 ;;
45 esac
46
47 # End $rc_base/init.d/haproxy