mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-30 00:22:06 +00:00
fff1e583aa
The ExecStartPre line was introduced a long time ago in the systemd unit file, at the time of systemd wrapper. With the haproxy master worker mode, this line is now useless, since starting haproxy itself will check the configuration. However this does not concern the check in the ExecReload which is still needed to return a reload status to HAProxy. It probably shouldn't be backported.
38 lines
1.3 KiB
SYSTEMD
38 lines
1.3 KiB
SYSTEMD
[Unit]
|
|
Description=HAProxy Load Balancer
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
EnvironmentFile=-/etc/default/haproxy
|
|
EnvironmentFile=-/etc/sysconfig/haproxy
|
|
Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid" "EXTRAOPTS=-S /run/haproxy-master.sock"
|
|
ExecStart=@SBINDIR@/haproxy -Ws -f $CONFIG -p $PIDFILE $EXTRAOPTS
|
|
ExecReload=@SBINDIR@/haproxy -Ws -f $CONFIG -c -q $EXTRAOPTS
|
|
ExecReload=/bin/kill -USR2 $MAINPID
|
|
KillMode=mixed
|
|
Restart=always
|
|
SuccessExitStatus=143
|
|
Type=notify
|
|
|
|
# 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.
|
|
|
|
# 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
|
|
# If your SystemD version supports them, you can add: @reboot, @swap, @sync
|
|
# SystemCallFilter=~@cpu-emulation @keyring @module @obsolete @raw-io
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|