BUG/MINOR: systemd: ExecStartPre must use -Ws
authorWilliam Lallemand <wlallemand@haproxy.org>
Fri, 20 Aug 2021 21:29:53 +0000 (23:29 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 20 Sep 2021 14:45:30 +0000 (16:45 +0200)
This line should disappear in a future version but we should still fix
ExecStartPre with -Ws like we've done in 9def142.

It's a complementary fix that must be backported with 9def142
("BUG/MINOR: systemd: must check the configuration using -Ws").

(cherry picked from commit 6f58c13797dc02a5b0c5be943f6d5396e486bd71)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 0857f96996f669fc17557dfc045c873b4d09b2d3)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>

contrib/systemd/haproxy.service.in

index cb7bbda..49d3c52 100644 (file)
@@ -7,7 +7,7 @@ Wants=network-online.target
 EnvironmentFile=-/etc/default/haproxy
 EnvironmentFile=-/etc/sysconfig/haproxy
 Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid" "EXTRAOPTS=-S /run/haproxy-master.sock"
-ExecStartPre=@SBINDIR@/haproxy -f $CONFIG -c -q $EXTRAOPTS
+ExecStartPre=@SBINDIR@/haproxy -Ws -f $CONFIG -c -q $EXTRAOPTS
 ExecStart=@SBINDIR@/haproxy -Ws -f $CONFIG -p $PIDFILE $EXTRAOPTS
 ExecReload=@SBINDIR@/haproxy -Ws -f $CONFIG -c -q $EXTRAOPTS
 ExecReload=/bin/kill -USR2 $MAINPID