Multi-user chat config

This commit is contained in:
Bob Mottram 2016-12-03 19:13:35 +00:00
parent 79bfa16557
commit 052b557053
2 changed files with 17 additions and 10 deletions

View File

@ -387,6 +387,23 @@ function xmpp_create_config {
echo 'Include "conf.d/*.cfg.lua"' >> /etc/prosody/prosody.cfg.lua
echo 'http_upload_path = "/var/lib/prosody/http_uploads"' >> /etc/prosody/prosody.cfg.lua
echo 'http_upload_file_size_limit = 50000000' >> /etc/prosody/prosody.cfg.lua
echo '' >> /etc/prosody/prosody.cfg.lua
echo "Component \"chat.${DEFAULT_DOMAIN_NAME}\" \"muc\"" >> /etc/prosody/prosody.cfg.lua
echo ' name = "Chatrooms"' >> /etc/prosody/prosody.cfg.lua
echo ' modules_enabled = {' >> /etc/prosody/prosody.cfg.lua
echo ' "muc_limits";' >> /etc/prosody/prosody.cfg.lua
echo ' "muc_log";' >> /etc/prosody/prosody.cfg.lua
echo ' "mam_muc";' >> /etc/prosody/prosody.cfg.lua
echo ' "muc_log_http";' >> /etc/prosody/prosody.cfg.lua
echo ' }' >> /etc/prosody/prosody.cfg.lua
echo 'storage = { muc_log = "sql"; }' >> /etc/prosody/prosody.cfg.lua
echo 'sql = { driver = "SQLite3", database = "prosody.sqlite" }' >> /etc/prosody/prosody.cfg.lua
echo 'muc_event_rate = 0.5;' >> /etc/prosody/prosody.cfg.lua
echo 'muc_burst_factor = 10;' >> /etc/prosody/prosody.cfg.lua
echo 'muc_log_by_default = false;' >> /etc/prosody/prosody.cfg.lua
echo 'muc_log_all_rooms = false;' >> /etc/prosody/prosody.cfg.lua
echo 'max_archive_query_results = 100;' >> /etc/prosody/prosody.cfg.lua
echo 'max_history_messages = 1000000;' >> /etc/prosody/prosody.cfg.lua
}
function install_xmpp_main {

View File

@ -704,16 +704,6 @@ function update_default_domain {
mkdir /etc/prosody/certs
fi
if [[ "$(cert_exists chat.${DEFAULT_DOMAIN_NAME} pem)" == "1" ]]; then
sed -i 's|--Component "conference.|Component "chat.|g' /etc/prosody/prosody.cfg.lua
fi
if [[ "$(cert_exists xmpp.${DEFAULT_DOMAIN_NAME} pem)" == "1" ]]; then
sed -i 's|--Component "conference.|Component "xmpp.|g' /etc/prosody/prosody.cfg.lua
fi
if [[ "$(cert_exists conference.${DEFAULT_DOMAIN_NAME} pem)" == "1" ]]; then
sed -i 's|--Component "conference.|Component "conference.|g' /etc/prosody/prosody.cfg.lua
fi
cp /etc/ssl/private/xmpp* /etc/prosody/certs
cp /etc/ssl/private/${DEFAULT_DOMAIN_NAME}* /etc/prosody/certs
cp /etc/ssl/certs/xmpp* /etc/prosody/certs