ejabberd conversion script

raw

1-phork0.txt

$ ejabberdctl convert_to_yaml /etc/ejabberd/ejabberd.cfg /tmp/ejabberd.yml
Problem 'error function_clause' occurred executing the command.
Stacktrace: [{p1_yaml,encode_pair,
                      [inet6,4],
                      [{file,"src/p1_yaml.erl"},{line,135}]},
             {p1_yaml,'-encode/2-lc$^0/1-1-',2,
                      [{file,"src/p1_yaml.erl"},{line,116}]},
             {p1_yaml,'-encode/2-lc$^0/1-1-',2,
                      [{file,"src/p1_yaml.erl"},{line,116}]},
             {p1_yaml,'-encode/2-lc$^1/1-0-',2,
                      [{file,"src/p1_yaml.erl"},{line,118}]},
             {p1_yaml,encode_pair,2,[{file,"src/p1_yaml.erl"},{line,136}]},
             {p1_yaml,'-encode/2-lc$^0/1-1-',2,
                      [{file,"src/p1_yaml.erl"},{line,116}]},
             {p1_yaml,'-encode/2-lc$^0/1-1-',2,
                      [{file,"src/p1_yaml.erl"},{line,116}]},
             {p1_yaml,encode,1,[{file,"src/p1_yaml.erl"},{line,108}]}]
raw

2-ejabberd.cfg.txt

{acl, admin, {user, "stefan", "endrullis.de"}}.
{acl, admin, {user, "joerg", "endrullis.de"}}.
{acl, admin, {user, "cweiske", "cweiske.de"}}.
{hosts, ["endrullis.de", "cweiske.de"]}.
{loglevel, 4}.
{listen,
 [
  {5222, ejabberd_c2s, [
			inet6,
			{access, c2s},
			{shaper, c2s_shaper},
			{max_stanza_size, 65536},
			starttls, {certfile, "/etc/ssl/private/cweiske.de_all.pem"}
		       ]},
  {5269, ejabberd_s2s_in, [
			   inet6,
			   {shaper, s2s_shaper},
			   {max_stanza_size, 131072}
			  ]},
  {5554, ejabberd_service, [
  			    {ip, {127, 0, 0, 1}},
  			    {access, all},
  			    {shaper_rule, fast},
  			    {host, "muc.localhost", [{password, ""}]}
  			    ]},
  {5555, ejabberd_service, [
  			    {ip, {127, 0, 0, 1}},
  			    {access, all},
  			    {shaper_rule, fast},
  			    {hosts, ["icq.endrullis.de"],
  				       [{password, ""}]}
  			    ]},
  {5280, ejabberd_http, [
			 http_bind,
			 http_poll,
			 web_admin
			]}
 ]}.
{max_fsm_queue, 1000}.
{s2s_use_starttls, true}.
{s2s_certfile, "/etc/ssl/private/cweiske.de_all.pem"}.
{auth_method, internal}.
{shaper, normal, {maxrate, 1000}}.
{shaper, fast, {maxrate, 50000}}.
{acl, local, {user_regexp, ""}}.
{access, max_user_sessions, [{10, all}]}.
{access, max_user_offline_messages, [{5000, admin}, {100, all}]}. 
{access, local, [{allow, local}]}.
{access, c2s, [{deny, blocked},
	       {allow, all}]}.
{access, c2s_shaper, [{none, admin},
		      {normal, all}]}.
{access, s2s_shaper, [{fast, all}]}.
{access, announce, [{allow, admin}]}.
{access, configure, [{allow, admin}]}.
{access, muc_admin, [{allow, admin}]}.
{access, muc, [{allow, all}]}.
{access, register, [{allow, all}]}.
{access, pubsub_createnode, [{allow, all}]}.
{language, "en"}.
{modules,
 [
  {mod_adhoc,    []},
  {mod_announce, [{access, announce}]}, % requires mod_adhoc
  {mod_caps,     []},
  {mod_configure,[]}, % requires mod_adhoc
  {mod_admin_extra, []},
  {mod_disco,    [{extra_domains, ["conference.endrullis.de"]}]},
  {mod_http_bind, []},
  {mod_irc,      []},
  {mod_last,     []},
  {mod_muc,      [
		  {access, muc},
		  {access_create, muc},
		  {access_persistent, muc},
		  {access_admin, muc_admin},
		  {max_users, 500}
		 ]},
  {mod_offline,  [{access_max_user_messages, max_user_offline_messages}]},
  {mod_privacy,  []},
  {mod_private,  []},
  {mod_proxy65,  [
		  {access, local},
		  {shaper, c2s_shaper}
		 ]},
  {mod_pubsub,   [ % requires mod_caps
		  {access_createnode, pubsub_createnode},
		  {pep_sendlast_offline, false},
		  {last_item_cache, false},
		  {plugins, ["flat", "hometree", "pep"]}  % pep requires mod_caps
		 ]},
  {mod_register, [
		  {welcome_message, {"Welcome!",
				     "Welcome to a Jabber service powered by Debian. "
				     "For information about Jabber visit "
				     "http://www.jabber.org"}},
		  {access, register}
		 ]},
  {mod_roster,   []},
  {mod_stats,    []},
  {mod_time,     []},
  {mod_vcard,    []},
  {mod_version,  []}
 ]}.
Christian Weiske Christian Weiske
owner

History