Skip to content
Snippets Groups Projects
Commit b1363adc authored by Bob Mottram's avatar Bob Mottram
Browse files

Ensure that muc logging is off

parent 44058cdf
No related branches found
No related tags found
No related merge requests found
......@@ -195,6 +195,18 @@ function logging_off_xmpp {
return
fi
logging_restart_prosody=
if ! grep -q 'muc_log_by_default = false;' /etc/prosody/prosody.cfg.lua; then
sed -i 's|muc_log_by_default.*|muc_log_by_default = false;|g' /etc/prosody/prosody.cfg.lua
logging_restart_prosody=1
fi
if ! grep -q 'muc_log_all_rooms = false;' /etc/prosody/prosody.cfg.lua; then
sed -i 's|muc_log_all_rooms.*|muc_log_all_rooms = false;|g' /etc/prosody/prosody.cfg.lua
logging_restart_prosody=1
fi
if ! grep -q '/dev/null' /etc/prosody/prosody.cfg.lua; then
if [ -d /etc/prosody ]; then
if grep -q "/var/log/prosody/prosody.log" /etc/prosody/prosody.cfg.lua; then
......@@ -205,6 +217,10 @@ function logging_off_xmpp {
rm -rf /var/log/prosody
fi
fi
logging_restart_prosody=1
fi
if [ $logging_restart_prosody ]; then
systemctl restart prosody
fi
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment