浏览代码

Multi-user chat config

Bob Mottram 8 年前
父节点
当前提交
052b557053
共有 2 个文件被更改,包括 17 次插入10 次删除
  1. 17
    0
      src/freedombone-app-xmpp
  2. 0
    10
      src/freedombone-utils-web

+ 17
- 0
src/freedombone-app-xmpp 查看文件

@@ -387,6 +387,23 @@ function xmpp_create_config {
387 387
     echo 'Include "conf.d/*.cfg.lua"' >> /etc/prosody/prosody.cfg.lua
388 388
     echo 'http_upload_path = "/var/lib/prosody/http_uploads"' >> /etc/prosody/prosody.cfg.lua
389 389
     echo 'http_upload_file_size_limit = 50000000' >> /etc/prosody/prosody.cfg.lua
390
+    echo '' >> /etc/prosody/prosody.cfg.lua
391
+    echo "Component \"chat.${DEFAULT_DOMAIN_NAME}\" \"muc\"" >> /etc/prosody/prosody.cfg.lua
392
+    echo '    name = "Chatrooms"' >> /etc/prosody/prosody.cfg.lua
393
+    echo '    modules_enabled = {' >> /etc/prosody/prosody.cfg.lua
394
+    echo '        "muc_limits";' >> /etc/prosody/prosody.cfg.lua
395
+    echo '        "muc_log";' >> /etc/prosody/prosody.cfg.lua
396
+    echo '        "mam_muc";' >> /etc/prosody/prosody.cfg.lua
397
+    echo '        "muc_log_http";' >> /etc/prosody/prosody.cfg.lua
398
+    echo '    }' >> /etc/prosody/prosody.cfg.lua
399
+    echo 'storage = { muc_log = "sql"; }' >> /etc/prosody/prosody.cfg.lua
400
+    echo 'sql = { driver = "SQLite3", database = "prosody.sqlite" }' >> /etc/prosody/prosody.cfg.lua
401
+    echo 'muc_event_rate = 0.5;' >> /etc/prosody/prosody.cfg.lua
402
+    echo 'muc_burst_factor = 10;' >> /etc/prosody/prosody.cfg.lua
403
+    echo 'muc_log_by_default = false;' >> /etc/prosody/prosody.cfg.lua
404
+    echo 'muc_log_all_rooms = false;' >> /etc/prosody/prosody.cfg.lua
405
+    echo 'max_archive_query_results = 100;' >> /etc/prosody/prosody.cfg.lua
406
+    echo 'max_history_messages = 1000000;' >> /etc/prosody/prosody.cfg.lua
390 407
 }
391 408
 
392 409
 function install_xmpp_main {

+ 0
- 10
src/freedombone-utils-web 查看文件

@@ -704,16 +704,6 @@ function update_default_domain {
704 704
                 mkdir /etc/prosody/certs
705 705
             fi
706 706
 
707
-            if [[ "$(cert_exists chat.${DEFAULT_DOMAIN_NAME} pem)" == "1" ]]; then
708
-                sed -i 's|--Component "conference.|Component "chat.|g' /etc/prosody/prosody.cfg.lua
709
-            fi
710
-            if [[ "$(cert_exists xmpp.${DEFAULT_DOMAIN_NAME} pem)" == "1" ]]; then
711
-                sed -i 's|--Component "conference.|Component "xmpp.|g' /etc/prosody/prosody.cfg.lua
712
-            fi
713
-            if [[ "$(cert_exists conference.${DEFAULT_DOMAIN_NAME} pem)" == "1" ]]; then
714
-                sed -i 's|--Component "conference.|Component "conference.|g' /etc/prosody/prosody.cfg.lua
715
-            fi
716
-
717 707
             cp /etc/ssl/private/xmpp* /etc/prosody/certs
718 708
             cp /etc/ssl/private/${DEFAULT_DOMAIN_NAME}* /etc/prosody/certs
719 709
             cp /etc/ssl/certs/xmpp* /etc/prosody/certs