mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-04 10:28:48 +00:00
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
15 lines
365 B
SYSTEMD
15 lines
365 B
SYSTEMD
[Unit]
|
|
Description=HAProxy Load Balancer
|
|
After=network.target
|
|
|
|
[Service]
|
|
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
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|