1
Author: Apollon Oikonomopoulos <apoikos@debian.org>
2
Description: systemd: also check the configuration on start
3
Checking the config in an ExecStartPre statement will avoid triggering the
4
restart action due to the daemon failing, thus avoiding marking the service as
5
failed and giving an immediate failure notification to the user.
7
Last-Update: 2014-06-20
9
--- a/contrib/systemd/haproxy.service.in
10
+++ b/contrib/systemd/haproxy.service.in
13
Environment=CONFIG=/etc/haproxy/haproxy.cfg
14
EnvironmentFile=-/etc/default/haproxy
15
+ExecStartPre=@SBINDIR@/haproxy -c -f ${CONFIG}
16
ExecStart=@SBINDIR@/haproxy-systemd-wrapper -f ${CONFIG} -p /run/haproxy.pid $EXTRAOPTS
17
ExecReload=@SBINDIR@/haproxy -c -f ${CONFIG}
18
ExecReload=/bin/kill -USR2 $MAINPID