MEDIUM: add systemd service

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
This commit is contained in:
Marc-Antoine Perennou 2013-02-13 09:28:50 +01:00 committed by Willy Tarreau
parent ed9803e606
commit f825580da8
3 changed files with 20 additions and 0 deletions

1
.gitignore vendored
View File

@ -16,3 +16,4 @@ haproxy-*
make-*
dlmalloc.c
00*.patch
*.service

8
contrib/systemd/Makefile Normal file
View File

@ -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

View File

@ -0,0 +1,11 @@
[Unit]
Description=HAProxy Load Balancer
After=network.target
[Service]
ExecStart=@SBINDIR@/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid
ExecReload=/bin/kill -USR2 $MAINPID
Restart=always
[Install]
WantedBy=multi-user.target