mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-20 07:53:01 +02:00
haproxy: Make /dev/log available in chroot
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE)
|
||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
PROG = haproxy
|
||||
PAK_VER = 4
|
||||
PAK_VER = 5
|
||||
|
||||
DEPS = ""
|
||||
|
||||
|
||||
@@ -11,6 +11,15 @@
|
||||
|
||||
case "${1}" in
|
||||
start)
|
||||
# Prepare chroot
|
||||
mkdir -p /var/lib/haproxy/dev
|
||||
|
||||
# Create link for syslog socket
|
||||
if ! mountpoint /var/lib/haproxy/dev/log &>/dev/null; then
|
||||
touch /var/lib/haproxy/dev/log
|
||||
mount --bind /dev/log /var/lib/haproxy/dev/log
|
||||
fi
|
||||
|
||||
boot_mesg "Starting HAProxy..."
|
||||
loadproc /usr/sbin/haproxy -D -f /etc/haproxy/haproxy.cfg \
|
||||
-p /var/run/haproxy.pid
|
||||
@@ -19,6 +28,11 @@ case "${1}" in
|
||||
stop)
|
||||
boot_mesg "Stopping HAProxy..."
|
||||
killproc /usr/sbin/haproxy
|
||||
|
||||
# umount /dev/log
|
||||
if mountpoint /var/lib/haproxy/dev/log &>/dev/null; then
|
||||
umount /var/lib/haproxy/dev/log
|
||||
fi
|
||||
;;
|
||||
|
||||
reload)
|
||||
|
||||
Reference in New Issue
Block a user