mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-11 22:15:14 +00:00
fe2c5c147b
* the configurable HTTP health check introduced in 1.1.23 revealed a shameful bug : the code still assumed that HTTP requests were the same size as the original ones (22 bytes), and failed if they were not. * added support for pidfiles.
25 lines
643 B
Bash
25 lines
643 B
Bash
#!/bin/bash
|
|
|
|
. `dirname $0`/functions
|
|
|
|
option config standard_option /etc/haproxy/haproxy.cfg
|
|
option bin reserved_option /usr/sbin/haproxy
|
|
option cmdline reserved_option '$bin -f ${opt_config} -p ${pidfile} -D -q'
|
|
|
|
function do_help {
|
|
echo "Usage: ${0##*/} <status|start|stop|help>"
|
|
echo "List of config.rc options (name, type, default value, current value) :"
|
|
echo
|
|
echo " - config ; def=/etc/haproxy/haproxy.cfg ; cur=$opt_confdir"
|
|
echo
|
|
exit 1
|
|
}
|
|
|
|
# assign default values to options and variables before parsing the cfg file
|
|
function fct_begin_section {
|
|
pidfile="/var/run/haproxy${2:+-$2}.pid"
|
|
}
|
|
|
|
load_config
|
|
|