From d1ff07455164622e8b102329734c38536ae69895 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 18 Nov 2016 15:54:05 +0000 Subject: [PATCH] Can turn off prosody log --- src/freedombone-logging | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/freedombone-logging b/src/freedombone-logging index 2ac07f7f..f938cf3e 100755 --- a/src/freedombone-logging +++ b/src/freedombone-logging @@ -72,9 +72,11 @@ if [[ "$1" == "on" || "$1" == "On" || "$1" == "ON" ]]; then if [ -d /etc/prosody ]; then if [ ! -d /var/log/prosody ]; then mkdir /var/log/prosody + chown root:adm /var/log/prosody fi sed -i 's|info = "/dev/null";|info = "/var/log/prosody/prosody.log";|g' /etc/prosody/prosody.cfg.lua sed -i 's|error = "/dev/null";|error = "/var/log/prosody/prosody.err";|g' /etc/prosody/prosody.cfg.lua + sed -i 's|levels = { "error" }; to = "/dev/null";|levels = { "error" }; to = "syslog";|g' /etc/prosody/prosody.cfg.lua fi if [ -d /etc/exim4 ]; then if [ ! -d /var/log/exim4 ]; then @@ -132,8 +134,9 @@ else if [ -d /etc/prosody ]; then sed -i 's|info = "/var/log/prosody/prosody.log";|info = "/dev/null";|g' /etc/prosody/prosody.cfg.lua sed -i 's|error = "/var/log/prosody/prosody.err";|error = "/dev/null";|g' /etc/prosody/prosody.cfg.lua - shred -zu /var/log/prosody/prosody.log - shred -zu /var/log/prosody/prosody.err + sed -i 's|levels = { "error" }; to = "syslog";|levels = { "error" }; to = "/dev/null";|g' /etc/prosody/prosody.cfg.lua + shred -zu /var/log/prosody/* + rm -rf /var/log/prosody fi if [ -d /etc/exim4 ]; then sed -i 's|log_selector =.*|log_selector = -all|g' /etc/exim4/conf.d/main/90_exim4-config_log_selector