blob: 5d8eecf06bfb190f93c95391a5eee913e4897316 [file] [log] [blame]
Marc-Antoine Perennouf8255802013-02-13 09:28:50 +01001[Unit]
2Description=HAProxy Load Balancer
3After=network.target
4
5[Service]
Pavlos Parissiscc23a792016-06-14 13:28:20 +02006Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid"
7ExecStartPre=@SBINDIR@/haproxy -f $CONFIG -c -q
Tim Duesterhusd6942c82017-11-20 15:58:35 +01008ExecStart=@SBINDIR@/haproxy -Ws -f $CONFIG -p $PIDFILE
Pavlos Parissis68535bd2016-06-15 10:20:31 +02009ExecReload=@SBINDIR@/haproxy -f $CONFIG -c -q
Marc-Antoine Perennouf8255802013-02-13 09:28:50 +010010ExecReload=/bin/kill -USR2 $MAINPID
Apollon Oikonomopoulos74f01692014-10-08 15:14:41 +030011KillMode=mixed
Marc-Antoine Perennouf8255802013-02-13 09:28:50 +010012Restart=always
Tim Duesterhusd6942c82017-11-20 15:58:35 +010013Type=notify
Marc-Antoine Perennouf8255802013-02-13 09:28:50 +010014
Tim Duesterhus1ce8de22018-02-27 20:19:03 +010015# The following lines leverage SystemD's sandboxing options to provide
16# defense in depth protection at the expense of restricting some flexibility
17# in your setup (e.g. placement of your configuration files) or possibly
18# reduced performance. See systemd.service(5) and systemd.exec(5) for further
19# information.
20
Marc-Antoine Perennouf8255802013-02-13 09:28:50 +010021[Install]
22WantedBy=multi-user.target