2013-02-13 08:28:50 +00:00
|
|
|
[Unit]
|
|
|
|
Description=HAProxy Load Balancer
|
|
|
|
After=network.target
|
|
|
|
|
|
|
|
[Service]
|
2016-06-14 11:28:20 +00:00
|
|
|
Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid"
|
|
|
|
ExecStartPre=@SBINDIR@/haproxy -f $CONFIG -c -q
|
2017-11-20 14:58:35 +00:00
|
|
|
ExecStart=@SBINDIR@/haproxy -Ws -f $CONFIG -p $PIDFILE
|
2016-06-15 08:20:31 +00:00
|
|
|
ExecReload=@SBINDIR@/haproxy -f $CONFIG -c -q
|
2013-02-13 08:28:50 +00:00
|
|
|
ExecReload=/bin/kill -USR2 $MAINPID
|
2014-10-08 12:14:41 +00:00
|
|
|
KillMode=mixed
|
2013-02-13 08:28:50 +00:00
|
|
|
Restart=always
|
2018-06-22 18:57:03 +00:00
|
|
|
SuccessExitStatus=143
|
2017-11-20 14:58:35 +00:00
|
|
|
Type=notify
|
2013-02-13 08:28:50 +00:00
|
|
|
|
2018-02-27 19:19:03 +00:00
|
|
|
# The following lines leverage SystemD's sandboxing options to provide
|
|
|
|
# defense in depth protection at the expense of restricting some flexibility
|
|
|
|
# in your setup (e.g. placement of your configuration files) or possibly
|
|
|
|
# reduced performance. See systemd.service(5) and systemd.exec(5) for further
|
|
|
|
# information.
|
|
|
|
|
2018-02-27 19:19:04 +00:00
|
|
|
# NoNewPrivileges=true
|
|
|
|
# ProtectHome=true
|
|
|
|
# If you want to use 'ProtectSystem=strict' you should whitelist the PIDFILE,
|
|
|
|
# any state files and any other files written using 'ReadWritePaths' or
|
|
|
|
# 'RuntimeDirectory'.
|
|
|
|
# ProtectSystem=true
|
|
|
|
# ProtectKernelTunables=true
|
|
|
|
# ProtectKernelModules=true
|
|
|
|
# ProtectControlGroups=true
|
2018-02-27 19:19:05 +00:00
|
|
|
# If your SystemD version supports them, you can add: @reboot, @swap, @sync
|
|
|
|
# SystemCallFilter=~@cpu-emulation @keyring @module @obsolete @raw-io
|
2018-02-27 19:19:04 +00:00
|
|
|
|
2013-02-13 08:28:50 +00:00
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|