blob: 9b7c3d1bbcad7811609bf23c887ca38a066aa3ba [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
William Lallemandeaa45552019-05-07 14:00:33 +02007EnvironmentFile=-/etc/sysconfig/haproxy
Tim Duesterhuseaa4b8a2019-05-06 13:00:53 +02008Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid" "EXTRAOPTS=-S /run/haproxy-master.sock"
Apollon Oikonomopoulosb0601482019-05-06 13:00:52 +02009ExecStartPre=@SBINDIR@/haproxy -f $CONFIG -c -q $EXTRAOPTS
10ExecStart=@SBINDIR@/haproxy -Ws -f $CONFIG -p $PIDFILE $EXTRAOPTS
11ExecReload=@SBINDIR@/haproxy -f $CONFIG -c -q $EXTRAOPTS
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
Vincent Bernat3b479bd2018-06-22 20:57:03 +020015SuccessExitStatus=143
Tim Duesterhusd6942c82017-11-20 15:58:35 +010016Type=notify
Marc-Antoine Perennouf8255802013-02-13 09:28:50 +010017
Tim Duesterhus1ce8de22018-02-27 20:19:03 +010018# The following lines leverage SystemD's sandboxing options to provide
19# defense in depth protection at the expense of restricting some flexibility
20# in your setup (e.g. placement of your configuration files) or possibly
21# reduced performance. See systemd.service(5) and systemd.exec(5) for further
22# information.
23
Tim Duesterhus8a965922018-02-27 20:19:04 +010024# NoNewPrivileges=true
25# ProtectHome=true
26# If you want to use 'ProtectSystem=strict' you should whitelist the PIDFILE,
27# any state files and any other files written using 'ReadWritePaths' or
28# 'RuntimeDirectory'.
29# ProtectSystem=true
30# ProtectKernelTunables=true
31# ProtectKernelModules=true
32# ProtectControlGroups=true
Tim Duesterhus2788a392018-02-27 20:19:05 +010033# If your SystemD version supports them, you can add: @reboot, @swap, @sync
34# SystemCallFilter=~@cpu-emulation @keyring @module @obsolete @raw-io
Tim Duesterhus8a965922018-02-27 20:19:04 +010035
Marc-Antoine Perennouf8255802013-02-13 09:28:50 +010036[Install]
37WantedBy=multi-user.target