haproxy: Log to syslog and install logrotate script

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2018-10-22 21:47:05 +02:00
parent 699f0aa710
commit c5494ad098
4 changed files with 17 additions and 0 deletions

View File

@@ -21,3 +21,6 @@ cron.none;daemon.*;local0.*;local2.*;*.info;mail.none;authpriv.* -/var/log/messa
# Postfix logs
mail.* -/var/log/mail
# HAProxy
local1.* -/var/log/haproxy

8
config/haproxy/logrotate Normal file
View File

@@ -0,0 +1,8 @@
/var/log/haproxy {
missingok
notifempty
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}

View File

@@ -1,5 +1,6 @@
#etc/haproxy
etc/haproxy/haproxy.cfg
etc/logrotate.d/haproxy
etc/rc.d/init.d/haproxy
usr/sbin/haproxy
#usr/sbin/haproxy-systemd-wrapper

View File

@@ -98,5 +98,10 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
#install initscripts
$(call INSTALL_INITSCRIPT,haproxy)
# Logrotate
-mkdir -pv /etc/logrotate.d
install -v -m 644 $(DIR_SRC)/config/haproxy/logrotate \
/etc/logrotate.d/haproxy
@rm -rf $(DIR_APP)
@$(POSTBUILD)