blob: eb1ad428b9185dcaa9070cbc116bc5477d4a234f [file] [log] [blame]
Marc-Antoine Perennouf8255802013-02-13 09:28:50 +01001[Unit]
2Description=HAProxy Load Balancer
Ryan O'Haraf49a6042020-06-15 11:34:54 -05003After=network-online.target
4Wants=network-online.target
Marc-Antoine Perennouf8255802013-02-13 09:28:50 +01005
6[Service]
Apollon Oikonomopoulosb0601482019-05-06 13:00:52 +02007EnvironmentFile=-/etc/default/haproxy
William Lallemandeaa45552019-05-07 14:00:33 +02008EnvironmentFile=-/etc/sysconfig/haproxy
Tim Duesterhuseaa4b8a2019-05-06 13:00:53 +02009Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid" "EXTRAOPTS=-S /run/haproxy-master.sock"
Apollon Oikonomopoulosb0601482019-05-06 13:00:52 +020010ExecStart=@SBINDIR@/haproxy -Ws -f $CONFIG -p $PIDFILE $EXTRAOPTS
William Lallemand9def1422021-07-26 11:03:54 +020011ExecReload=@SBINDIR@/haproxy -Ws -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