haproxy/examples/init.haproxy.flx0
willy tarreau 982249e9e7 * released 1.2.1 (1.1.28)
* added the '-V' command line option to verbosely report errors even though
  the -q or 'quiet' options are specified. This is useful with '-c'.
* added a Red Hat init script and a .spec from Simon Matter <simon.matter@invoca.ch>
* added 'rspdeny' and 'rspideny' to block certain responses to avoid sensible
  information leak from servers.
* more examples added into the configuration
2005-12-18 00:57:06 +01:00

30 lines
759 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|conf>"
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
}
# reads the configuration file and checks its syntax.
function do_conf {
$bin -c -V -q -f ${opt_config}
}
# 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