Can turn off prosody log
This commit is contained in:
parent
9a1e2f3f6b
commit
d1ff074551
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue