mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-24 13:42:16 +00:00
MINOR: systemd: Use variable for config and pidfile paths
Users can set the location of haproxy.cfg and pidfile files by providing a systemd overwrite file /etc/systemd/system/haproxy.service.d/overwrite.conf with the following content: [Service] Environment=CONFIG=/etc/foobar/haproxy.cfg
This commit is contained in:
parent
dd01678a79
commit
cc23a79f34
@ -3,8 +3,9 @@ Description=HAProxy Load Balancer
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStartPre=@SBINDIR@/haproxy -f /etc/haproxy/haproxy.cfg -c -q
|
||||
ExecStart=@SBINDIR@/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid
|
||||
Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid"
|
||||
ExecStartPre=@SBINDIR@/haproxy -f $CONFIG -c -q
|
||||
ExecStart=@SBINDIR@/haproxy-systemd-wrapper -f $CONFIG -p $PIDFILE
|
||||
ExecReload=/bin/kill -USR2 $MAINPID
|
||||
KillMode=mixed
|
||||
Restart=always
|
||||
|
Loading…
Reference in New Issue
Block a user