]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: systemd: support /etc/sysconfig/ for redhat based distrib
authorWilliam Lallemand <wlallemand@haproxy.org>
Tue, 7 May 2019 12:00:33 +0000 (14:00 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Tue, 7 May 2019 12:11:55 +0000 (14:11 +0200)
The patch "MINOR: systemd: Make use of master socket in systemd unit"
introduces an environment file in /etc/default.

Unfortunatly this is not supported on redhat-based system, so we add
/etc/sysconfig/haproxy for that.

contrib/systemd/haproxy.service.in

index 44c369cfd956ee568ddab2c200a0bcde42e6c250..9b7c3d1bbcad7811609bf23c887ca38a066aa3ba 100644 (file)
@@ -4,6 +4,7 @@ After=network.target
 
 [Service]
 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
 ExecStart=@SBINDIR@/haproxy -Ws -f $CONFIG -p $PIDFILE $EXTRAOPTS