blob: 44c369cfd956ee568ddab2c200a0bcde42e6c250 [file] [log] [blame]
Marc-Antoine Perennouf8255802013-02-13 09:28:50 +01001[Unit]
2Description=HAProxy Load Balancer
3After=network.target
4
5[Service]
Apollon Oikonomopoulosb0601482019-05-06 13:00:52 +02006EnvironmentFile=-/etc/default/haproxy
Tim Duesterhuseaa4b8a2019-05-06 13:00:53 +02007Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid" "EXTRAOPTS=-S /run/haproxy-master.sock"
Apollon Oikonomopoulosb0601482019-05-06 13:00:52 +02008ExecStartPre=@SBINDIR@/haproxy -f $CONFIG -c -q $EXTRAOPTS
9ExecStart=@SBINDIR@/haproxy -Ws -f $CONFIG -p $PIDFILE $EXTRAOPTS
10ExecReload=@SBINDIR@/haproxy -f $CONFIG -c -q $EXTRAOPTS
Marc-Antoine Perennouf8255802013-02-13 09:28:50 +010011ExecReload=/bin/kill -USR2 $MAINPID
Apollon Oikonomopoulos74f01692014-10-08 15:14:41 +030012KillMode=mixed
Marc-Antoine Perennouf8255802013-02-13 09:28:50 +010013Restart=always
Vincent Bernat3b479bd2018-06-22 20:57:03 +020014SuccessExitStatus=143
Tim Duesterhusd6942c82017-11-20 15:58:35 +010015Type=notify
Marc-Antoine Perennouf8255802013-02-13 09:28:50 +010016
Tim Duesterhus1ce8de22018-02-27 20:19:03 +010017# The following lines leverage SystemD's sandboxing options to provide
18# defense in depth protection at the expense of restricting some flexibility
19# in your setup (e.g. placement of your configuration files) or possibly
20# reduced performance. See systemd.service(5) and systemd.exec(5) for further
21# information.
22
Tim Duesterhus8a965922018-02-27 20:19:04 +010023# NoNewPrivileges=true
24# ProtectHome=true
25# If you want to use 'ProtectSystem=strict' you should whitelist the PIDFILE,
26# any state files and any other files written using 'ReadWritePaths' or
27# 'RuntimeDirectory'.
28# ProtectSystem=true
29# ProtectKernelTunables=true
30# ProtectKernelModules=true
31# ProtectControlGroups=true
Tim Duesterhus2788a392018-02-27 20:19:05 +010032# If your SystemD version supports them, you can add: @reboot, @swap, @sync
33# SystemCallFilter=~@cpu-emulation @keyring @module @obsolete @raw-io
Tim Duesterhus8a965922018-02-27 20:19:04 +010034
Marc-Antoine Perennouf8255802013-02-13 09:28:50 +010035[Install]
36WantedBy=multi-user.target