~ubuntu-branches/ubuntu/hardy/haproxy/hardy

« back to all changes in this revision

Viewing changes to examples/init.haproxy.flx0

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Cornet
  • Date: 2007-08-17 09:33:41 UTC
  • Revision ID: james.westby@ubuntu.com-20070817093341-h0t6aeeoyzo25z3r
Tags: upstream-1.3.12.dfsg
ImportĀ upstreamĀ versionĀ 1.3.12.dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
7
option  cmdline         reserved_option '$bin -f ${opt_config} -p ${pidfile} -D -q'
 
8
 
 
9
function do_help {
 
10
    echo "Usage: ${0##*/} <status|start|stop|help|conf>"
 
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
 
 
18
# reads the configuration file and checks its syntax.
 
19
function do_conf {
 
20
    $bin -c -V -q -f ${opt_config}
 
21
}
 
22
 
 
23
# assign default values to options and variables before parsing the cfg file
 
24
function fct_begin_section {
 
25
    pidfile="/var/run/haproxy${2:+-$2}.pid"
 
26
}
 
27
 
 
28
load_config
 
29