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

Remove muc log if it exists

parent b1363adc
No related branches found
No related tags found
No related merge requests found
......@@ -197,6 +197,16 @@ function logging_off_xmpp {
logging_restart_prosody=
# remove any chat log
read_config_param DEFAULT_DOMAIN_NAME
prosody_chat_domain="chat.${DEFAULT_DOMAIN_NAME}"
# shellcheck disable=SC2001
prosody_chat_domain_str=$(echo "$prosody_chat_domain" | sed 's|.|%2e|g')
if [ -d "/var/lib/prosody/${prosody_chat_domain_str}/muc_log" ]; then
rm -rf "/var/lib/prosody/${prosody_chat_domain_str}/muc_log"
logging_restart_prosody=1
fi
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
......
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