From 31ed3154e51f2eb9c6200eac68231463c64720c9 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 7 Nov 2008 18:08:06 +0000 Subject: made path more default introduced logrotating for apache --- files/OpenBSD/bin/apache_logrotate.sh | 6 ++++++ files/OpenBSD/bin/restart_apache.sh | 6 ++++++ files/OpenBSD/bin/restart_apache_ssl.sh | 6 ++++++ files/openbsd/bin/restart_apache.sh | 6 ------ files/openbsd/bin/restart_apache_ssl.sh | 6 ------ 5 files changed, 18 insertions(+), 12 deletions(-) create mode 100644 files/OpenBSD/bin/apache_logrotate.sh create mode 100644 files/OpenBSD/bin/restart_apache.sh create mode 100644 files/OpenBSD/bin/restart_apache_ssl.sh delete mode 100644 files/openbsd/bin/restart_apache.sh delete mode 100644 files/openbsd/bin/restart_apache_ssl.sh (limited to 'files') diff --git a/files/OpenBSD/bin/apache_logrotate.sh b/files/OpenBSD/bin/apache_logrotate.sh new file mode 100644 index 0000000..c8614f8 --- /dev/null +++ b/files/OpenBSD/bin/apache_logrotate.sh @@ -0,0 +1,6 @@ +#!/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 $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\"";' diff --git a/files/OpenBSD/bin/restart_apache.sh b/files/OpenBSD/bin/restart_apache.sh new file mode 100644 index 0000000..4dc936d --- /dev/null +++ b/files/OpenBSD/bin/restart_apache.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +ignoreout='Processing config' +apachectl restart 2>&1 | (egrep -v -e "_default_ VirtualHost overlap on port 443" -e "$ignoreout" -e "/usr/sbin/apachectl restart: httpd restarted" || true ) +sleep 10 +apachectl start 2>&1 | (egrep -v -e "_default_ VirtualHost overlap on port 443" -e "$ignoreout" -e "/usr/sbin/apachectl startssl: httpd started" || true ) diff --git a/files/OpenBSD/bin/restart_apache_ssl.sh b/files/OpenBSD/bin/restart_apache_ssl.sh new file mode 100644 index 0000000..314018b --- /dev/null +++ b/files/OpenBSD/bin/restart_apache_ssl.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +ignoreout='Processing config' +apachectl restart 2>&1 | (egrep -v -e "_default_ VirtualHost overlap on port 443" -e "$ignoreout" -e "/usr/sbin/apachectl restart: httpd restarted" || true ) +sleep 10 +apachectl startssl 2>&1 | (egrep -v -e "_default_ VirtualHost overlap on port 443" -e "$ignoreout" -e "/usr/sbin/apachectl startssl: httpd started" || true ) diff --git a/files/openbsd/bin/restart_apache.sh b/files/openbsd/bin/restart_apache.sh deleted file mode 100644 index 4dc936d..0000000 --- a/files/openbsd/bin/restart_apache.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -ignoreout='Processing config' -apachectl restart 2>&1 | (egrep -v -e "_default_ VirtualHost overlap on port 443" -e "$ignoreout" -e "/usr/sbin/apachectl restart: httpd restarted" || true ) -sleep 10 -apachectl start 2>&1 | (egrep -v -e "_default_ VirtualHost overlap on port 443" -e "$ignoreout" -e "/usr/sbin/apachectl startssl: httpd started" || true ) diff --git a/files/openbsd/bin/restart_apache_ssl.sh b/files/openbsd/bin/restart_apache_ssl.sh deleted file mode 100644 index 314018b..0000000 --- a/files/openbsd/bin/restart_apache_ssl.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -ignoreout='Processing config' -apachectl restart 2>&1 | (egrep -v -e "_default_ VirtualHost overlap on port 443" -e "$ignoreout" -e "/usr/sbin/apachectl restart: httpd restarted" || true ) -sleep 10 -apachectl startssl 2>&1 | (egrep -v -e "_default_ VirtualHost overlap on port 443" -e "$ignoreout" -e "/usr/sbin/apachectl startssl: httpd started" || true ) -- cgit v1.2.3