Handle nginx logs
This commit is contained in:
parent
54368be2eb
commit
c3fe06a66b
|
@ -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|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
|
sed -i "s|error_log.*|error_log /var/log/nginx/$filename_domain.err.log $WEBSERVER_LOG_LEVEL;|g" $filename
|
||||||
done
|
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
|
fi
|
||||||
if [ -f /etc/init.d/spamassassin ]; then
|
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
|
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|warn_log.*|warn_log /dev/null;|g' $filename
|
||||||
sed -i 's|error_log.*|error_log /dev/null;|g' $filename
|
sed -i 's|error_log.*|error_log /dev/null;|g' $filename
|
||||||
done
|
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/*
|
shred -zu /var/log/nginx/*
|
||||||
fi
|
fi
|
||||||
if [ -f /etc/init.d/spamassassin ]; then
|
if [ -f /etc/init.d/spamassassin ]; then
|
||||||
|
|
Loading…
Reference in New Issue