2005-12-17 13:08:03 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
. `dirname $0`/functions
|
|
|
|
|
|
|
|
option config standard_option /etc/haproxy/haproxy.cfg
|
|
|
|
option bin reserved_option /usr/sbin/haproxy
|
2005-12-17 13:14:34 +00:00
|
|
|
option cmdline reserved_option '$bin -f ${opt_config} -p ${pidfile} -D -q'
|
2005-12-17 13:08:03 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2005-12-17 13:14:34 +00:00
|
|
|
# assign default values to options and variables before parsing the cfg file
|
|
|
|
function fct_begin_section {
|
|
|
|
pidfile="/var/run/haproxy${2:+-$2}.pid"
|
|
|
|
}
|
2005-12-17 13:08:03 +00:00
|
|
|
|
|
|
|
load_config
|
|
|
|
|