2013-02-13 08:28:50 +00:00
|
|
|
[Unit]
|
|
|
|
Description=HAProxy Load Balancer
|
2020-06-15 16:34:54 +00:00
|
|
|
After=network-online.target
|
|
|
|
Wants=network-online.target
|
2013-02-13 08:28:50 +00:00
|
|
|
|
|
|
|
[Service]
|
2019-05-06 11:00:52 +00:00
|
|
|
EnvironmentFile=-/etc/default/haproxy
|
2019-05-07 12:00:33 +00:00
|
|
|
EnvironmentFile=-/etc/sysconfig/haproxy
|
2019-05-06 11:00:53 +00:00
|
|
|
Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid" "EXTRAOPTS=-S /run/haproxy-master.sock"
|
2019-05-06 11:00:52 +00:00
|
|
|
ExecStartPre=@SBINDIR@/haproxy -f $CONFIG -c -q $EXTRAOPTS
|
|
|
|
ExecStart=@SBINDIR@/haproxy -Ws -f $CONFIG -p $PIDFILE $EXTRAOPTS
|
|
|
|
ExecReload=@SBINDIR@/haproxy -f $CONFIG -c -q $EXTRAOPTS
|
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
|