From da76459dc21b5af2449af2d36eb95226cb186ce2 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 11:35:11 +0200 Subject: Adding upstream version 2.6.12. Signed-off-by: Daniel Baumann --- admin/systemd/Makefile | 8 ++++++++ admin/systemd/haproxy.service.in | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 admin/systemd/Makefile create mode 100644 admin/systemd/haproxy.service.in (limited to 'admin/systemd') diff --git a/admin/systemd/Makefile b/admin/systemd/Makefile new file mode 100644 index 0000000..e542c23 --- /dev/null +++ b/admin/systemd/Makefile @@ -0,0 +1,8 @@ +PREFIX = /usr/local +SBINDIR = $(PREFIX)/sbin + +haproxy.service: haproxy.service.in + sed -e 's:@SBINDIR@:'$(strip $(SBINDIR))':' $< > $@ + +clean: + rm -f haproxy.service diff --git a/admin/systemd/haproxy.service.in b/admin/systemd/haproxy.service.in new file mode 100644 index 0000000..eb1ad42 --- /dev/null +++ b/admin/systemd/haproxy.service.in @@ -0,0 +1,37 @@ +[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 -- cgit v1.2.3