From c3fe06a66b784d77c4995ea1c80cb5705a21f04a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 18 Nov 2016 15:03:32 +0000 Subject: [PATCH] Handle nginx logs --- src/freedombone-logging | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/freedombone-logging b/src/freedombone-logging index 9a6b7906..029e07d3 100755 --- a/src/freedombone-logging +++ b/src/freedombone-logging @@ -63,6 +63,8 @@ if [[ "$1" == "on" || "$1" == "On" || "$1" == "ON" ]]; then sed -i "s|access_log.*|access_log /var/log/nginx/$filename_domain.access.log;|g" $filename sed -i "s|error_log.*|error_log /var/log/nginx/$filename_domain.err.log $WEBSERVER_LOG_LEVEL;|g" $filename done + sed -i 's|access_log.*|access_log = /var/log/nginx/access.log;|g' /etc/nginx/nginx.conf + sed -i 's|error_log.*|error_log = /var/log/nginx/error.log;|g' /etc/nginx/nginx.conf fi if [ -f /etc/init.d/spamassassin ]; then sed -i 's|DOPTIONS="-s null -d --pidfile=$PIDFILE"|DOPTIONS="-d --pidfile=$PIDFILE"|g' /etc/init.d/spamassassin @@ -120,6 +122,8 @@ else sed -i 's|warn_log.*|warn_log /dev/null;|g' $filename sed -i 's|error_log.*|error_log /dev/null;|g' $filename done + sed -i 's|access_log.*|access_log = /dev/null;|g' /etc/nginx/nginx.conf + sed -i 's|error_log.*|error_log = /dev/null;|g' /etc/nginx/nginx.conf shred -zu /var/log/nginx/* fi if [ -f /etc/init.d/spamassassin ]; then