blob: 74e66e302065be6eb7cf3c362b1193e0668dc5b4 [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
Vincent Bernat3b479bd2018-06-22 20:57:03 +020013SuccessExitStatus=143
Tim Duesterhusd6942c82017-11-20 15:58:35 +010014Type=notify
Marc-Antoine Perennouf8255802013-02-13 09:28:50 +010015
Tim Duesterhus1ce8de22018-02-27 20:19:03 +010016# The following lines leverage SystemD's sandboxing options to provide
17# defense in depth protection at the expense of restricting some flexibility
18# in your setup (e.g. placement of your configuration files) or possibly
19# reduced performance. See systemd.service(5) and systemd.exec(5) for further
20# information.
21
Tim Duesterhus8a965922018-02-27 20:19:04 +010022# NoNewPrivileges=true
23# ProtectHome=true
24# If you want to use 'ProtectSystem=strict' you should whitelist the PIDFILE,
25# any state files and any other files written using 'ReadWritePaths' or
26# 'RuntimeDirectory'.
27# ProtectSystem=true
28# ProtectKernelTunables=true
29# ProtectKernelModules=true
30# ProtectControlGroups=true
Tim Duesterhus2788a392018-02-27 20:19:05 +010031# If your SystemD version supports them, you can add: @reboot, @swap, @sync
32# SystemCallFilter=~@cpu-emulation @keyring @module @obsolete @raw-io
Tim Duesterhus8a965922018-02-27 20:19:04 +010033
Marc-Antoine Perennouf8255802013-02-13 09:28:50 +010034[Install]
35WantedBy=multi-user.target