From b9bc467e4239065da6c2ad5018150d385780abeb Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Wed, 12 Dec 2018 09:09:16 -0500 Subject: [PATCH] ejabberd.yml vs ejabberd.cfg Signed-off-by: Jason Etheridge --- installer/stretch/eg_stretch_installer.sh | 6 +- installer/stretch/ejabberd.EG.patch | 117 ++++++++++++++---------------- 2 files changed, 58 insertions(+), 65 deletions(-) diff --git a/installer/stretch/eg_stretch_installer.sh b/installer/stretch/eg_stretch_installer.sh index 27d9930df..114944095 100755 --- a/installer/stretch/eg_stretch_installer.sh +++ b/installer/stretch/eg_stretch_installer.sh @@ -313,13 +313,13 @@ EOF fi echo Return Value = $? # Patch Ejabberd and register users - if [ ! "$(grep 'public.localhost' /etc/ejabberd/ejabberd.cfg)" ]; then + if [ ! "$(grep 'public.localhost' /etc/ejabberd/ejabberd.yml)" ]; then cd /etc/ejabberd/ /etc/init.d/ejabberd stop; killall beam epmd; # just in case - cp ejabberd.cfg /root/ejabberd.cfg.orig + cp ejabberd.yml /root/ejabberd.yml patch -p0 < $BASE_DIR/ejabberd.EG.patch - chown ejabberd:ejabberd ejabberd.cfg + chown ejabberd:ejabberd ejabberd.yml echo starting ejabberd after patching date /etc/init.d/ejabberd start diff --git a/installer/stretch/ejabberd.EG.patch b/installer/stretch/ejabberd.EG.patch index d011b5f5b..52c34a55e 100644 --- a/installer/stretch/ejabberd.EG.patch +++ b/installer/stretch/ejabberd.EG.patch @@ -1,62 +1,55 @@ ---- ejabberd.cfg 2010-08-13 16:03:40.000000000 -0400 -+++ /tmp/ejabberd.cfg.orig 2010-08-13 16:07:13.000000000 -0400 -@@ -58,7 +58,7 @@ - {acl, admin, {user, "", "localhost"}}. - - %% Hostname --{hosts, ["localhost"]}. -+{hosts, ["public.localhost", "private.localhost"]}. - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -@@ -115,7 +115,7 @@ - {5222, ejabberd_c2s, [ - {access, c2s}, - {shaper, c2s_shaper}, -- {max_stanza_size, 65536}, -+ {max_stanza_size, 200000}, - %%zlib, - starttls, {certfile, "/etc/ejabberd/ejabberd.pem"} - ]}, -@@ -133,7 +133,7 @@ - - {5269, ejabberd_s2s_in, [ - {shaper, s2s_shaper}, -- {max_stanza_size, 131072} -+ {max_stanza_size, 200000} - ]}, - - %% External MUC jabber-muc -@@ -406,12 +406,12 @@ - %% - %% The "normal" shaper limits traffic speed to 1.000 B/s - %% --{shaper, normal, {maxrate, 1000}}. -+{shaper, normal, {maxrate, 500000}}. - - %% - %% The "fast" shaper limits traffic speed to 50.000 B/s - %% --{shaper, fast, {maxrate, 50000}}. -+{shaper, normal, {maxrate, 500000}}. - - - %%% ==================== -@@ -457,7 +457,7 @@ - %%% ACCESS RULES - - %% Define the maximum number of time a single user is allowed to connect: --{access, max_user_sessions, [{10, all}]}. -+{access, max_user_sessions, [{5000, all}]}. - - %% Maximum number of offline messages that users can have: - {access, max_user_offline_messages, [{5000, admin}, {100, all}]}. -@@ -581,7 +581,7 @@ - {max_users, 500} - ]}, - %%{mod_muc_log,[]}, -- {mod_offline, [{access_max_user_messages, max_user_offline_messages}]}, -+ %%{mod_offline, [{access_max_user_messages, max_user_offline_messages}]}, - {mod_privacy, []}, - {mod_private, []}, - {mod_proxy65, [ +--- ejabberd.yml.orig 2018-12-12 08:54:43.000000000 -0500 ++++ ejabberd.yml 2018-12-12 09:03:38.000000000 -0500 +@@ -82,6 +82,8 @@ + ## + hosts: + - "localhost" ++ - "private.localhost" ++ - "public.localhost" + + ## + ## route_subdomains: Delegate subdomains to other XMPP servers. +@@ -248,7 +250,7 @@ + ## + ## Store the plain passwords or hashed for SCRAM: + ## auth_password_format: plain +-auth_password_format: scram ++auth_password_format: plain + ## + ## Define the FQDN if ejabberd doesn't detect it: + ## fqdn: "server3.example.com" +@@ -393,12 +395,12 @@ + ## + ## The "normal" shaper limits traffic speed to 1000 B/s + ## +- normal: 1000 ++ normal: 500000 + + ## + ## The "fast" shaper limits traffic speed to 50000 B/s + ## +- fast: 50000 ++ fast: 500000 + + ## + ## This option specifies the maximum number of elements in the queue +@@ -473,7 +475,7 @@ + + shaper_rules: + ## Maximum number of simultaneous sessions allowed for a single user: +- max_user_sessions: 10 ++ max_user_sessions: 10000 + ## Maximum number of offline messages that users can have: + max_user_offline_messages: + - 5000: admin +@@ -607,8 +609,8 @@ + ## mod_muc_log: {} + mod_muc_admin: {} + ## mod_multicast: {} +- mod_offline: +- access_max_user_messages: max_user_offline_messages ++ ##mod_offline: ++ ##access_max_user_messages: max_user_offline_messages + mod_ping: {} + ## mod_pres_counter: + ## count: 5 -- 2.11.0