summaryrefslogtreecommitdiff
path: root/files/scripts/OpenBSD/bin/apache_logrotate.sh
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-01-30 17:09:34 +0100
committermh <mh@immerda.ch>2010-01-30 17:09:34 +0100
commit7aafb4dbfe33f19d0a2a82d5bab79d77deb27853 (patch)
tree9140ab7df68e205dc92037d5180daead7d871242 /files/scripts/OpenBSD/bin/apache_logrotate.sh
parent42ca80476bcdb1da0e5e516d08a9b06ec32c6f26 (diff)
parent550fa2b0a405e9bda6e2d82a1e423396a7ffdaa8 (diff)
merged with lavamind
Diffstat (limited to 'files/scripts/OpenBSD/bin/apache_logrotate.sh')
-rw-r--r--files/scripts/OpenBSD/bin/apache_logrotate.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/files/scripts/OpenBSD/bin/apache_logrotate.sh b/files/scripts/OpenBSD/bin/apache_logrotate.sh
new file mode 100644
index 0000000..c2fcad9
--- /dev/null
+++ b/files/scripts/OpenBSD/bin/apache_logrotate.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+WEBROOT="/var/www/htdocs"
+#PIDFILE="/var/www/logs/httpd.pid"
+echo "#Autogenrated newsyslog.conf\n# logfile_name owner:group mode count size when flags"
+find /var/www/logs -name '*_log' -exec perl -e 'print "\n{}\twww:www\t644\t30\t*\t\$D0\tZ" ' \;
+find $WEBROOT -name '*_log' -exec perl -e 'print "\n{}\twww:www\t644\t30\t*\t\$D0\tZ" ' \;
+perl -e 'print "\t\t \"/bin/sh /opt/bin/restart_apache.sh\"";'