willy tarreau | eedaa9f | 2005-12-17 14:08:03 +0100 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | . `dirname $0`/functions |
| 4 | |
| 5 | option config standard_option /etc/haproxy/haproxy.cfg |
| 6 | option bin reserved_option /usr/sbin/haproxy |
willy tarreau | fe2c5c1 | 2005-12-17 14:14:34 +0100 | [diff] [blame] | 7 | option cmdline reserved_option '$bin -f ${opt_config} -p ${pidfile} -D -q' |
willy tarreau | eedaa9f | 2005-12-17 14:08:03 +0100 | [diff] [blame] | 8 | |
| 9 | function do_help { |
| 10 | echo "Usage: ${0##*/} <status|start|stop|help>" |
| 11 | echo "List of config.rc options (name, type, default value, current value) :" |
| 12 | echo |
| 13 | echo " - config ; def=/etc/haproxy/haproxy.cfg ; cur=$opt_confdir" |
| 14 | echo |
| 15 | exit 1 |
| 16 | } |
| 17 | |
willy tarreau | fe2c5c1 | 2005-12-17 14:14:34 +0100 | [diff] [blame] | 18 | # assign default values to options and variables before parsing the cfg file |
| 19 | function fct_begin_section { |
| 20 | pidfile="/var/run/haproxy${2:+-$2}.pid" |
| 21 | } |
willy tarreau | eedaa9f | 2005-12-17 14:08:03 +0100 | [diff] [blame] | 22 | |
| 23 | load_config |
| 24 | |