mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-27 04:43:37 -04:00
MEDIUM: add systemd service
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
This commit is contained in:
parent
ed9803e606
commit
f825580da8
3 changed files with 20 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -16,3 +16,4 @@ haproxy-*
|
|||
make-*
|
||||
dlmalloc.c
|
||||
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 a new issue