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