From 67883a369ceb17337d7e808d6a854fae9b393d3c Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sat, 2 Jun 2012 08:26:06 -0700 Subject: [PATCH] Add logrotate file to Shorewall-init Signed-off-by: Tom Eastep --- Shorewall-init/install.sh | 13 +++++++++++++ Shorewall-init/logrotate | 5 +++++ Shorewall-init/sysconfig | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 Shorewall-init/logrotate diff --git a/Shorewall-init/install.sh b/Shorewall-init/install.sh index 9fae4244f..a201a2041 100755 --- a/Shorewall-init/install.sh +++ b/Shorewall-init/install.sh @@ -260,6 +260,11 @@ else first_install="Yes" fi +if [ -n "$DESTDIR" ]; then + mkdir -p ${DESTDIR}${CONFDIR}/logrotate.d + chmod 755 ${DESTDIR}${CONFDIR}/logrotate.d +fi + # # Install the Firewall Script # @@ -295,6 +300,14 @@ fi mkdir -p ${DESTDIR}/usr/share/shorewall-init chmod 755 ${DESTDIR}/usr/share/shorewall-init +# +# Install logrotate file +# +if [ -d ${DESTDIR}${CONFDIR}/logrotate.d ]; then + run_install $OWNERSHIP -m 0644 logrotate ${DESTDIR}${CONFDIR}/logrotate.d/$PRODUCT + echo "Logrotate file installed as ${DESTDIR}${CONFDIR}/logrotate.d/$PRODUCT" +fi + # # Create the version file # diff --git a/Shorewall-init/logrotate b/Shorewall-init/logrotate new file mode 100644 index 000000000..cc5678da3 --- /dev/null +++ b/Shorewall-init/logrotate @@ -0,0 +1,5 @@ +/var/log/shorewall-ifupdown.log { + missingok + notifempty + create 0600 root root +} diff --git a/Shorewall-init/sysconfig b/Shorewall-init/sysconfig index 24530f2d0..a308822e2 100644 --- a/Shorewall-init/sysconfig +++ b/Shorewall-init/sysconfig @@ -19,5 +19,5 @@ SAVE_IPSETS="" # # Where Up/Down events get logged # -LOGFILE=/var/log/shorewall-updown.log +LOGFILE=/var/log/shorewall-ifupdown.log