diff --git a/Shorewall-lite/install.sh b/Shorewall-lite/install.sh index de2d35456..fd0abf002 100755 --- a/Shorewall-lite/install.sh +++ b/Shorewall-lite/install.sh @@ -1,4 +1,4 @@ -#!/bin/sh +\#!/bin/sh # # Script to install Shoreline Firewall Lite # @@ -220,6 +220,11 @@ mkdir -p ${PREFIX}/var/lib/shorewall-lite chmod 755 ${PREFIX}/etc/shorewall-lite chmod 755 ${PREFIX}/usr/share/shorewall-lite +if [ -n "$PREFIX" ]; then + mkdir -p ${PREFIX}/etc/logrotate.d + chmod 755 ${PREFIX}/etc/logrotate.d +fi + # # Install the config file # @@ -304,6 +309,12 @@ cd .. echo "Man Pages Installed" +if [ -d ${PREFIX}/etc/logrotate.d ]; then + run_install $OWNERSHIP -m 0644 logrotate ${PREFIX}/etc/logrotate.d/shorewall-lite + echo "Logrotate file installed as ${PREFIX}/etc/logrotate.d/shorewall-lite" +fi + + # # Create the version file # diff --git a/Shorewall-lite/logrotate b/Shorewall-lite/logrotate new file mode 100644 index 000000000..45db65089 --- /dev/null +++ b/Shorewall-lite/logrotate @@ -0,0 +1,5 @@ +/var/log/shorewall-init.log { + missingok + notifempty + create 0600 root root +} diff --git a/Shorewall-lite/shorewall-lite.spec b/Shorewall-lite/shorewall-lite.spec index 5e7144f07..50bcb48ba 100644 --- a/Shorewall-lite/shorewall-lite.spec +++ b/Shorewall-lite/shorewall-lite.spec @@ -79,6 +79,8 @@ fi %attr(0755,root,root) %dir /usr/share/shorewall-lite %attr(0700,root,root) %dir /var/lib/shorewall-lite +%attr(0644,root,root) /etc/logrotate.d/shorewall-lite + %attr(0755,root,root) /sbin/shorewall-lite %attr(0644,root,root) /usr/share/shorewall-lite/version diff --git a/Shorewall/install.sh b/Shorewall/install.sh index 0c0d7c936..eeaac7f52 100755 --- a/Shorewall/install.sh +++ b/Shorewall/install.sh @@ -242,6 +242,12 @@ mkdir -p ${PREFIX}/var/lib/shorewall chmod 755 ${PREFIX}/etc/shorewall chmod 755 ${PREFIX}/usr/share/shorewall chmod 755 ${PREFIX}/usr/share/shorewall/configfiles + +if [ -n "$PREFIX" ]; then + mkdir -p ${PREFIX}/etc/logrotate.d + chmod 755 ${PREFIX}/etc/logrotate.d +fi + # # Install the config file # @@ -792,6 +798,11 @@ cd .. echo "Man Pages Installed" +if [ -d ${PREFIX}/etc/logrotate.d ]; then + run_install $OWNERSHIP -m 0644 logrotate ${PREFIX}/etc/logrotate.d/shorewall + echo "Logrotate file installed as ${PREFIX}/etc/logrotate.d/shorewall" +fi + if [ -z "$PREFIX" ]; then rm -rf /usr/share/shorewall-perl rm -rf /usr/share/shorewall-shell diff --git a/Shorewall/logrotate b/Shorewall/logrotate new file mode 100644 index 000000000..45db65089 --- /dev/null +++ b/Shorewall/logrotate @@ -0,0 +1,5 @@ +/var/log/shorewall-init.log { + missingok + notifempty + create 0600 root root +} diff --git a/Shorewall/shorewall.spec b/Shorewall/shorewall.spec index 08ecbf8ea..ce13dd343 100644 --- a/Shorewall/shorewall.spec +++ b/Shorewall/shorewall.spec @@ -77,6 +77,8 @@ fi %attr(0644,root,root) %config(noreplace) /etc/shorewall/* %attr(0600,root,root) /etc/shorewall/Makefile +%attr(0644,root,root) /etc/logrotate.d/shorewall + %attr(0755,root,root) /sbin/shorewall %attr(0644,root,root) /usr/share/shorewall/version diff --git a/Shorewall6-lite/install.sh b/Shorewall6-lite/install.sh index d77c98625..e48d2f107 100755 --- a/Shorewall6-lite/install.sh +++ b/Shorewall6-lite/install.sh @@ -219,6 +219,11 @@ mkdir -p ${PREFIX}/var/lib/shorewall6-lite chmod 755 ${PREFIX}/etc/shorewall6-lite chmod 755 ${PREFIX}/usr/share/shorewall6-lite +if [ -n "$PREFIX" ]; then + mkdir -p ${PREFIX}/etc/logrotate.d + chmod 755 ${PREFIX}/etc/logrotate.d +fi + # # Install the config file # @@ -303,6 +308,11 @@ cd .. echo "Man Pages Installed" +if [ -d ${PREFIX}/etc/logrotate.d ]; then + run_install $OWNERSHIP -m 0644 logrotate ${PREFIX}/etc/logrotate.d/shorewall6-lite + echo "Logrotate file installed as ${PREFIX}/etc/logrotate.d/shorewall6-lite" +fi + # # Create the version file # diff --git a/Shorewall6-lite/logrotate b/Shorewall6-lite/logrotate new file mode 100644 index 000000000..ee5e24669 --- /dev/null +++ b/Shorewall6-lite/logrotate @@ -0,0 +1,5 @@ +/var/log/shorewall6-init.log { + missingok + notifempty + create 0600 root root +} diff --git a/Shorewall6-lite/shorewall6-lite.spec b/Shorewall6-lite/shorewall6-lite.spec index c7ab214e1..91b323954 100644 --- a/Shorewall6-lite/shorewall6-lite.spec +++ b/Shorewall6-lite/shorewall6-lite.spec @@ -72,6 +72,8 @@ fi %attr(0755,root,root) /sbin/shorewall6-lite +%attr(0755,root,root) /sbin/shorewall6-lite + %attr(0644,root,root) /usr/share/shorewall6-lite/version %attr(0644,root,root) /usr/share/shorewall6-lite/configpath %attr(- ,root,root) /usr/share/shorewall6-lite/functions diff --git a/Shorewall6/install.sh b/Shorewall6/install.sh index 2833e9efd..b027760d4 100755 --- a/Shorewall6/install.sh +++ b/Shorewall6/install.sh @@ -234,6 +234,12 @@ mkdir -p ${PREFIX}/var/lib/shorewall6 chmod 755 ${PREFIX}/etc/shorewall6 chmod 755 ${PREFIX}/usr/share/shorewall6 chmod 755 ${PREFIX}/usr/share/shorewall6/configfiles + +if [ -n "$PREFIX" ]; then + mkdir -p ${PREFIX}/etc/logrotate.d + chmod 755 ${PREFIX}/etc/logrotate.d +fi + # # Install the config file # @@ -642,6 +648,11 @@ cd .. echo "Man Pages Installed" +if [ -d ${PREFIX}/etc/logrotate.d ]; then + run_install $OWNERSHIP -m 0644 logrotate ${PREFIX}/etc/logrotate.d/shorewall6 + echo "Logrotate file installed as ${PREFIX}/etc/logrotate.d/shorewall6" +fi + if [ -z "$PREFIX" -a -n "$first_install" -a -z "$CYGWIN" ]; then if [ -n "$DEBIAN" ]; then run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall6 diff --git a/Shorewall6/logrotate b/Shorewall6/logrotate new file mode 100644 index 000000000..ee5e24669 --- /dev/null +++ b/Shorewall6/logrotate @@ -0,0 +1,5 @@ +/var/log/shorewall6-init.log { + missingok + notifempty + create 0600 root root +} diff --git a/Shorewall6/shorewall6.spec b/Shorewall6/shorewall6.spec index 53f65518f..b3bbf2374 100644 --- a/Shorewall6/shorewall6.spec +++ b/Shorewall6/shorewall6.spec @@ -69,6 +69,8 @@ fi %attr(0644,root,root) %config(noreplace) /etc/shorewall6/* %attr(0600,root,root) /etc/shorewall6/Makefile +%attr(0644,root,root) /etc/logrotate.d/shorewall6 + %attr(0755,root,root) /sbin/shorewall6 %attr(0644,root,root) /usr/share/shorewall6/version