2009-12-21 20:58:46 +00:00
|
|
|
#!/bin/sh /etc/rc.common
|
2010-02-04 14:52:04 +00:00
|
|
|
# Copyright (C) 2009-2010 OpenWrt.org
|
2009-12-21 20:58:46 +00:00
|
|
|
|
|
|
|
START=99
|
|
|
|
STOP=80
|
|
|
|
|
2011-11-14 02:38:47 +00:00
|
|
|
SERVICE_USE_PID=1
|
|
|
|
|
2009-12-21 20:58:46 +00:00
|
|
|
HAPROXY_BIN="/usr/sbin/haproxy"
|
|
|
|
HAPROXY_CONFIG="/etc/haproxy.cfg"
|
|
|
|
HAPROXY_PID="/var/run/haproxy.pid"
|
|
|
|
|
|
|
|
start() {
|
2011-11-14 02:38:47 +00:00
|
|
|
service_start $HAPROXY_BIN -q -D -f "$HAPROXY_CONFIG" -p "$HAPROXY_PID"
|
2009-12-21 20:58:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
2011-11-14 02:38:47 +00:00
|
|
|
service_stop $HAPROXY_BIN
|
2009-12-21 20:58:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
reload() {
|
2012-03-18 23:30:23 +00:00
|
|
|
$HAPROXY_BIN -D -q -f $HAPROXY_CONFIG -p $HAPROXY_PID -sf $(cat $HAPROXY_PID)
|
2009-12-21 20:58:46 +00:00
|
|
|
}
|