mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
MEDIUM: add systemd service
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
This commit is contained in:
parent
ed9803e606
commit
f825580da8
1
.gitignore
vendored
1
.gitignore
vendored
@ -16,3 +16,4 @@ haproxy-*
|
|||||||
make-*
|
make-*
|
||||||
dlmalloc.c
|
dlmalloc.c
|
||||||
00*.patch
|
00*.patch
|
||||||
|
*.service
|
||||||
|
8
contrib/systemd/Makefile
Normal file
8
contrib/systemd/Makefile
Normal 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
|
11
contrib/systemd/haproxy.service.in
Normal file
11
contrib/systemd/haproxy.service.in
Normal 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
|
Loading…
Reference in New Issue
Block a user