blob: edbd4c292dd589bc1eff300d2859afafe9ccef3a [file] [log] [blame]
Marc-Antoine Perennouf8255802013-02-13 09:28:50 +01001[Unit]
2Description=HAProxy Load Balancer
3After=network.target
4
5[Service]
Olivier Houchard2c9744f2017-04-09 16:28:10 +02006# You can point the environment variable HAPROXY_STATS_SOCKET to a stats
7# socket if you want seamless reloads.
Pavlos Parissiscc23a792016-06-14 13:28:20 +02008Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid"
9ExecStartPre=@SBINDIR@/haproxy -f $CONFIG -c -q
Tim Duesterhusd6942c82017-11-20 15:58:35 +010010ExecStart=@SBINDIR@/haproxy -Ws -f $CONFIG -p $PIDFILE
Pavlos Parissis68535bd2016-06-15 10:20:31 +020011ExecReload=@SBINDIR@/haproxy -f $CONFIG -c -q
Marc-Antoine Perennouf8255802013-02-13 09:28:50 +010012ExecReload=/bin/kill -USR2 $MAINPID
Apollon Oikonomopoulos74f01692014-10-08 15:14:41 +030013KillMode=mixed
Marc-Antoine Perennouf8255802013-02-13 09:28:50 +010014Restart=always
Tim Duesterhusd6942c82017-11-20 15:58:35 +010015Type=notify
Marc-Antoine Perennouf8255802013-02-13 09:28:50 +010016
17[Install]
18WantedBy=multi-user.target