~ubuntu-branches/debian/stretch/haproxy/stretch

« back to all changes in this revision

Viewing changes to debian/haproxy.init

  • Committer: Package Import Robot
  • Author(s): Apollon Oikonomopoulos
  • Date: 2014-06-20 11:05:17 UTC
  • mfrom: (1.1.15) (15.1.12 experimental)
  • Revision ID: package-import@ubuntu.com-20140620110517-u6q5p9kyy2f3ozw9
Tags: 1.5.0-1
* New upstream stable series. Notable changes since the 1.4 series:
  + Native SSL support on both sides with SNI/NPN/ALPN and OCSP stapling.
  + IPv6 and UNIX sockets are supported everywhere
  + End-to-end HTTP keep-alive for better support of NTLM and improved
    efficiency in static farms
  + HTTP/1.1 response compression (deflate, gzip) to save bandwidth
  + PROXY protocol versions 1 and 2 on both sides
  + Data sampling on everything in request or response, including payload
  + ACLs can use any matching method with any input sample
  + Maps and dynamic ACLs updatable from the CLI
  + Stick-tables support counters to track activity on any input sample
  + Custom format for logs, unique-id, header rewriting, and redirects
  + Improved health checks (SSL, scripted TCP, check agent, ...)
  + Much more scalable configuration supports hundreds of thousands of
    backends and certificates without sweating

* Upload to unstable, merge all 1.5 work from experimental. Most important
  packaging changes since 1.4.25-1 include:
  + systemd support.
  + A more sane default config file.
  + Zero-downtime upgrades between 1.5 releases by gracefully reloading
    HAProxy during upgrades.
  + HTML documentation shipped in the haproxy-doc package.
  + kqueue support for kfreebsd.

* Packaging changes since 1.5~dev26-2:
  + Drop patches merged upstream:
    o Fix-reference-location-in-manpage.patch
    o 0001-BUILD-stats-workaround-stupid-and-bogus-Werror-forma.patch
  + d/watch: look for stable 1.5 releases
  + systemd: respect CONFIG and EXTRAOPTS when specified in
    /etc/default/haproxy.
  + initscript: test the configuration before start or reload.
  + initscript: remove the ENABLED flag and logic.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
PIDFILE=/var/run/haproxy.pid
16
16
CONFIG=/etc/haproxy/haproxy.cfg
17
17
HAPROXY=/usr/sbin/haproxy
 
18
RUNDIR=/run/haproxy
18
19
EXTRAOPTS=
19
 
ENABLED=0
20
20
 
21
21
test -x $HAPROXY || exit 0
22
22
 
25
25
fi
26
26
 
27
27
test -f "$CONFIG" || exit 0
28
 
test "$ENABLED" != "0" || exit 0
29
28
 
30
29
[ -f /etc/default/rcS ] && . /etc/default/rcS
31
30
. /lib/lsb/init-functions
32
31
 
33
32
 
 
33
check_haproxy_config()
 
34
{
 
35
        $HAPROXY -c -f "$CONFIG" >/dev/null
 
36
        if [ $? -eq 1 ]; then
 
37
                log_end_msg 1
 
38
                exit 1
 
39
        fi
 
40
}
 
41
 
34
42
haproxy_start()
35
43
{
36
 
        start-stop-daemon --start --pidfile "$PIDFILE" \
 
44
        [ -d "$RUNDIR" ] || mkdir "$RUNDIR"
 
45
        chown haproxy:haproxy "$RUNDIR"
 
46
        chmod 2775 "$RUNDIR"
 
47
 
 
48
        check_haproxy_config
 
49
 
 
50
        start-stop-daemon --quiet --oknodo --start --pidfile "$PIDFILE" \
37
51
                --exec $HAPROXY -- -f "$CONFIG" -D -p "$PIDFILE" \
38
52
                $EXTRAOPTS || return 2
39
53
        return 0
54
68
 
55
69
haproxy_reload()
56
70
{
 
71
        check_haproxy_config
 
72
 
57
73
        $HAPROXY -f "$CONFIG" -p $PIDFILE -D $EXTRAOPTS -sf $(cat $PIDFILE) \
58
74
                || return 2
59
75
        return 0