blob: a7edd9c0880093d5f18473fe6fe99a459706399a [file] [log] [blame]
willy tarreaueedaa9f2005-12-17 14:08:03 +01001#!/bin/bash
2
3. `dirname $0`/functions
4
5option config standard_option /etc/haproxy/haproxy.cfg
6option bin reserved_option /usr/sbin/haproxy
willy tarreaufe2c5c12005-12-17 14:14:34 +01007option cmdline reserved_option '$bin -f ${opt_config} -p ${pidfile} -D -q'
willy tarreaueedaa9f2005-12-17 14:08:03 +01008
9function do_help {
willy tarreau982249e2005-12-18 00:57:06 +010010 echo "Usage: ${0##*/} <status|start|stop|help|conf>"
willy tarreaueedaa9f2005-12-17 14:08:03 +010011 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 tarreau982249e2005-12-18 00:57:06 +010018# reads the configuration file and checks its syntax.
19function do_conf {
20 $bin -c -V -q -f ${opt_config}
21}
22
willy tarreaufe2c5c12005-12-17 14:14:34 +010023# assign default values to options and variables before parsing the cfg file
24function fct_begin_section {
25 pidfile="/var/run/haproxy${2:+-$2}.pid"
26}
willy tarreaueedaa9f2005-12-17 14:08:03 +010027
28load_config
29