haproxy/haproxy.service
Alexey Shabalin 36a2009451 2.0.14-alt1
- 2.0.14
- build with prometheus-exporter
- add security options to systemd unit
2020-04-18 14:42:44 +03:00

28 lines
800 B
Desktop File

[Unit]
Description=HAProxy Load Balancer
Documentation=man:haproxy(1)
After=network.target
[Service]
EnvironmentFile=-/etc/sysconfig/haproxy
Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid" "EXTRAOPTS=-S /run/haproxy-master.sock"
ExecStartPre=/usr/sbin/haproxy -f $CONFIG -c -q $EXTRAOPTS
ExecStart=/usr/sbin/haproxy -Ws -f $CONFIG -p $PIDFILE $EXTRAOPTS
ExecReload=/usr/sbin/haproxy -f $CONFIG -c -q $EXTRAOPTS
ExecReload=/bin/kill -USR2 $MAINPID
KillMode=mixed
Restart=always
SuccessExitStatus=143
Type=notify
NoNewPrivileges=true
ProtectHome=true
ProtectSystem=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
SystemCallFilter=~@cpu-emulation @keyring @module @obsolete @raw-io @reboot @swap @sync
[Install]
WantedBy=multi-user.target