2016-10-31 23:34:57 +03:00
|
|
|
[Unit]
|
|
|
|
Description=HAProxy Load Balancer
|
|
|
|
Documentation=man:haproxy(1)
|
|
|
|
Documentation=file:/usr/share/doc/haproxy/configuration.txt.gz
|
|
|
|
After=network.target syslog.service multibinder.service
|
|
|
|
Wants=syslog.service multibinder.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Environment=CONFIG=/etc/haproxy/%i.cfg.erb
|
|
|
|
Environment=MULTIBINDER_SOCK=/run/multibinder.sock
|
|
|
|
EnvironmentFile=-/etc/default/haproxy
|
2016-10-31 23:52:42 +03:00
|
|
|
ExecStartPre=/usr/local/bin/multibinder-haproxy-erb /usr/sbin/haproxy -f ${CONFIG} -c -q
|
|
|
|
ExecStart=/usr/local/bin/multibinder-haproxy-wrapper /usr/sbin/haproxy -Ds -f ${CONFIG} -p /run/haproxy-%i.pid $EXTRAOPTS
|
|
|
|
ExecReload=/bin/sh -c "/usr/local/bin/multibinder-haproxy-erb /usr/sbin/haproxy -c -f ${CONFIG}; /bin/kill -USR2 $MAINPID"
|
2016-10-31 23:34:57 +03:00
|
|
|
ExecStop=/bin/kill -TERM $MAINPID
|
|
|
|
KillMode=none
|
|
|
|
Restart=always
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|