aboutsummaryrefslogtreecommitdiffstats
path: root/net-im/ejabberd/files
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2004-08-19 18:11:13 +0800
committersobomax <sobomax@FreeBSD.org>2004-08-19 18:11:13 +0800
commit426d6f1c1fe45e5c58f1aec32a8629bacd791d77 (patch)
tree84d166ab3b903b1a3e6acc38a0f32576768db675 /net-im/ejabberd/files
parent4a9a9c89683f5c3d142a345d768e13f5f082394a (diff)
downloadfreebsd-ports-gnome-426d6f1c1fe45e5c58f1aec32a8629bacd791d77.tar.gz
freebsd-ports-gnome-426d6f1c1fe45e5c58f1aec32a8629bacd791d77.tar.zst
freebsd-ports-gnome-426d6f1c1fe45e5c58f1aec32a8629bacd791d77.zip
Add ejabberd 0.7, free and Open Source distributed fault-tolerant Jabber
server. PR: ports/69339 Submitted by: Alexander Timoshenko <gonzo@univ.kiev.ua>
Diffstat (limited to 'net-im/ejabberd/files')
-rw-r--r--net-im/ejabberd/files/ejabberd.cfg.sample176
-rw-r--r--net-im/ejabberd/files/patch-src::configure11
-rw-r--r--net-im/ejabberd/files/patch-src::ejabberd34
-rw-r--r--net-im/ejabberd/files/patch-src::ejabberd.sh45
-rw-r--r--net-im/ejabberd/files/patch-src::ejabberdctl9
-rw-r--r--net-im/ejabberd/files/patch-src::mod_last.erl20
6 files changed, 295 insertions, 0 deletions
diff --git a/net-im/ejabberd/files/ejabberd.cfg.sample b/net-im/ejabberd/files/ejabberd.cfg.sample
new file mode 100644
index 000000000000..ab18fa3ba2d7
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd.cfg.sample
@@ -0,0 +1,176 @@
+% Default Debian ejabberd.cfg
+
+%override_acls.
+
+
+% Users that have admin access. Add line like one of the following after you
+% will be successfully registered on server to get admin access:
+%{acl, admin, {user, "aleksey"}}.
+%{acl, admin, {user, "ermine"}}.
+
+% Blocked users:
+%{acl, blocked, {user, "test"}}.
+
+% Local users:
+{acl, local, {user_regexp, ""}}.
+
+% Another examples of ACLs:
+%{acl, jabberorg, {server, "jabber.org"}}.
+%{acl, aleksey, {user, "aleksey", "jabber.ru"}}.
+%{acl, test, {user_regexp, "^test"}}.
+%{acl, test, {user_glob, "test*"}}.
+
+
+% Only admins can use configuration interface:
+{access, configure, [{allow, admin}]}.
+
+% Every username can be registered via in-band registration:
+{access, register, [{allow, all}]}.
+
+% None username can be registered via in-band registration:
+%{access, register, [{deny, all}]}.
+
+% After successful registration user will get message with following subject
+% and body:
+{welcome_message,
+ {"Welcome!",
+ "Welcome to Debian Jabber Service. "
+ "For information about Jabber visit http://jabber.org"}}.
+% Replace them with 'none' if you don't want to send such message:
+%{welcome_message, none}.
+
+% List of people who will get notifications about registered users
+%{registration_watchers, ["admin1@localhost",
+% "admin2@localhost"]}.
+
+% Only admins can send announcement messages:
+{access, announce, [{allow, admin}]}.
+
+
+% Only non-blocked users can use c2s connections:
+{access, c2s, [{deny, blocked},
+ {allow, all}]}.
+
+% Set shaper with name "normal" to limit traffic speed to 1000B/s
+{shaper, normal, {maxrate, 1000}}.
+
+% Set shaper with name "fast" to limit traffic speed to 50000B/s
+{shaper, fast, {maxrate, 50000}}.
+
+% For all users except admins used "normal" shaper
+{access, c2s_shaper, [{none, admin},
+ {normal, all}]}.
+
+% For all S2S connections used "fast" shaper
+{access, s2s_shaper, [{fast, all}]}.
+
+% Admins of this server are also admins of MUC service:
+{access, muc_admin, [{allow, admin}]}.
+
+% All users are allowed to use MUC service:
+{access, muc, [{allow, all}]}.
+
+% This rule allows access only for local users:
+{access, local, [{allow, local}]}.
+
+
+% Authentification method. If you want to use internal user base, then use
+% this line:
+{auth_method, internal}.
+
+% For LDAP uthentification use these lines instead of above one:
+%{auth_method, ldap}.
+%{ldap_servers, ["localhost"]}. % List of LDAP servers
+%{ldap_uidattr, "uid"}. % LDAP attribute that holds user ID
+%{ldap_base, "dc=example,dc=com"}. % Base of LDAP directory
+
+
+% Host name: (replace for your hostname)
+{host, "localhost"}.
+
+% Default language for server messages
+{language, "en"}.
+
+% Listened ports:
+{listen,
+% Ordinary client-2-server service
+ [{5222, ejabberd_c2s, [{access, c2s},
+ {shaper, c2s_shaper}]},
+
+% SSL-enabled client-2-server service, uncomment these lines to
+% enable ssl
+% {5223, ejabberd_c2s, [{access, c2s},
+% ssl,
+% {certfile, "/etc/ssl/certs/ejabberd.pem"}]},
+
+% Server-2-server service
+ {5269, ejabberd_s2s_in, [{shaper, s2s_shaper}]},
+
+% External MUC jabber-muc (but internal mod_muc is better :))
+% {5554, ejabberd_service, [{ip, {127, 0, 0, 1}},
+% {access, all},
+% {host, "muc.localhost", [{password, "secret"}]}]},
+
+% Jabber ICQ Transport
+% {5555, ejabberd_service, [{ip, {127, 0, 0, 1}},
+% {access, all},
+% {hosts, ["icq.localhost", "sms.localhost"], [{password, "secret"}]}]},
+
+% AIM Transport
+% {5556, ejabberd_service, [{ip, {127, 0, 0, 1}},
+% {access, all},
+% {host, "aim.localhost", [{password, "secret"}]}]},
+
+% MSN Transport
+% {5557, ejabberd_service, [{ip, {127, 0, 0, 1}},
+% {access, all},
+% {host, "msn.localhost", [{password, "secret"}]}]},
+
+% Yahoo! Transport
+% {5558, ejabberd_service, [{ip, {127, 0, 0, 1}},
+% {access, all},
+% {host, "yahoo.localhost", [{password, "secret"}]}]},
+
+% External JUD (internal is more powerful,
+% but doesn't allow to register users from other servers)
+% {5559, ejabberd_service, [{ip, {127, 0, 0, 1}},
+% {access, all},
+% {host, "jud.localhost", [{password, "secret"}]}]},
+
+% HTTP service (You may choose options HTTP-polling and Web-administering)
+% When commenting out, be careful with commas
+ {5280, ejabberd_http, [http_poll, web_admin]}
+ ]}.
+
+% If SRV lookup fails, then port 5269 is used to communicate with remote server
+{outgoing_s2s_port, 5269}.
+
+% Used modules:
+{modules,
+ [
+ {mod_register, [{access, register}]},
+ {mod_roster, []},
+ {mod_privacy, []},
+ {mod_configure, []},
+ {mod_configure2, []},
+ {mod_disco, [{extra_domains, ["users.jabber.org"]}]},
+ {mod_stats, []},
+ {mod_vcard, []},
+ {mod_offline, []},
+ {mod_echo, []},
+ {mod_private, []},
+ {mod_irc, []},
+% Default options for mod_muc:
+% host: "conference." ++ ?MYNAME
+% access: all
+% access_create: all
+% access_admin: none (only room creator has owner privileges)
+ {mod_muc, [{access, muc},
+ {access_create, muc},
+ {access_admin, muc_admin}]},
+ {mod_pubsub, []},
+ {mod_time, []},
+ {mod_last, []},
+ {mod_version, []}
+ ]}.
+
diff --git a/net-im/ejabberd/files/patch-src::configure b/net-im/ejabberd/files/patch-src::configure
new file mode 100644
index 000000000000..0c6c7684931f
--- /dev/null
+++ b/net-im/ejabberd/files/patch-src::configure
@@ -0,0 +1,11 @@
+--- configure.orig Sat Jul 3 14:58:07 2004
++++ configure Sat Jul 3 15:01:49 2004
+@@ -2180,7 +2180,7 @@
+ fi
+
+
+- if test "z$ERLC" == "z" || test "z$ERL" == "z"; then
++ if test -z "$ERLC" || test -z "$ERL"; then
+ { { echo "$as_me:$LINENO: error: erlang not found" >&5
+ echo "$as_me: error: erlang not found" >&2;}
+ { (exit 1); exit 1; }; }
diff --git a/net-im/ejabberd/files/patch-src::ejabberd b/net-im/ejabberd/files/patch-src::ejabberd
new file mode 100644
index 000000000000..c10fa05691ab
--- /dev/null
+++ b/net-im/ejabberd/files/patch-src::ejabberd
@@ -0,0 +1,34 @@
+--- ejabberd.orig Thu Jan 1 03:00:00 1970
++++ ejabberd Sat Jul 3 15:52:35 2004
+@@ -0,0 +1,31 @@
++#!/bin/sh
++
++[ -r /var/run/ejabberd/.erlang.cookie ] && HOME=/var/run/ejabberd
++
++CONFIG=%%PREFIX%%/etc/ejabberd.cfg
++LOG=/var/log/ejabberd/ejabberd.log
++SASL_LOG=/var/log/ejabberd/sasl.log
++SPOOL=/var/spool/ejabberd
++
++ARGS=
++while [ $# -ne 0 ];
++do
++ PARAM=$1
++ shift
++ case $PARAM in
++ --) break ;;
++ --config) CONFIG=$1 ; shift ;;
++ --log) LOG=$1 ; shift ;;
++ --sasl-log) SASL_LOG=$1 ; shift ;;
++ --spool) SPOOL=$1 ; shift ;;
++ *) ARGS="$ARGS $PARAM"
++ esac
++done
++
++exec erl -sname ejabberd \
++ -s ejabberd -detached \
++ -ejabberd config \"$CONFIG\" log_path \"$LOG\" \
++ -sasl sasl_error_logger \{file,\"$SASL_LOG\"\} \
++ -mnesia dir \"$SPOOL\" \
++ $ARGS "$@"
++
diff --git a/net-im/ejabberd/files/patch-src::ejabberd.sh b/net-im/ejabberd/files/patch-src::ejabberd.sh
new file mode 100644
index 000000000000..294917dbfb26
--- /dev/null
+++ b/net-im/ejabberd/files/patch-src::ejabberd.sh
@@ -0,0 +1,45 @@
+--- ejabberd.sh Thu Jan 1 03:00:00 1970
++++ ejabberd.sh Sat Jul 3 16:49:51 2004
+@@ -0,0 +1,42 @@
++#! /bin/sh
++#
++# ejabberd Start/stop ejabberd server
++#
++#
++
++PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
++EJABBERD=%%PREFIX%%/bin/ejabberd
++EJABBERDCTL=%%PREFIX%%/bin/ejabberdctl
++EJABBERDUSER=ejabberd
++NAME=ejabberd
++DESC=ejabberd
++
++test -f $EJABBERD || exit 0
++test -f $EJABBERDCTL || exit 0
++
++set -e
++
++case "$1" in
++ start)
++ echo -n "Starting $DESC: "
++ su ejabberd -c "$EJABBERD -heart -noshell -detached"
++ echo "$NAME."
++ ;;
++ stop)
++ echo -n "Stopping $DESC: "
++ su ejabberd -c "$EJABBERDCTL stop"
++ echo "$NAME."
++ ;;
++ restart|force-reload)
++ echo -n "Restarting $DESC: "
++ su ejabberd -c "$EJABBERDCTL restart"
++ echo "$NAME."
++ ;;
++ *)
++ N=/etc/init.d/$NAME
++ echo "Usage: $N {start|stop|restart|force-reload}" >&2
++ exit 1
++ ;;
++esac
++
++exit 0
diff --git a/net-im/ejabberd/files/patch-src::ejabberdctl b/net-im/ejabberd/files/patch-src::ejabberdctl
new file mode 100644
index 000000000000..23bca0660790
--- /dev/null
+++ b/net-im/ejabberd/files/patch-src::ejabberdctl
@@ -0,0 +1,9 @@
+--- ejabberdctl.orig Thu Jan 1 03:00:00 1970
++++ ejabberdctl Sat Jul 3 15:53:38 2004
+@@ -0,0 +1,6 @@
++#!/bin/sh
++
++[ -r /var/run/ejabberd/.erlang.cookie ] && HOME=/var/run/ejabberd
++
++exec erl -noinput -sname ejabberdctl -s ejabberd_ctl -extra ejabberd@`hostname -s` "$@"
++
diff --git a/net-im/ejabberd/files/patch-src::mod_last.erl b/net-im/ejabberd/files/patch-src::mod_last.erl
new file mode 100644
index 000000000000..81ebfe6e4a88
--- /dev/null
+++ b/net-im/ejabberd/files/patch-src::mod_last.erl
@@ -0,0 +1,20 @@
+--- mod_last.erl.orig
++++ mod_last.erl
+@@ -102,7 +102,16 @@
+ sub_el = [{xmlelement, "query",
+ [{"xmlns", ?NS_LAST},
+ {"seconds", integer_to_list(Sec)}],
+- [{xmlcdata, Status}]}]}
++ [{xmlcdata, Status}]}]};
++ [{last_activity, _, TimeStamp}] ->
++ {MegaSecs, Secs, _MicroSecs} = now(),
++ TimeStamp2 = MegaSecs * 1000000 + Secs,
++ Sec = TimeStamp2 - TimeStamp,
++ IQ#iq{type = result,
++ sub_el = [{xmlelement, "query",
++ [{"xmlns", ?NS_LAST},
++ {"seconds", integer_to_list(Sec)}],
++ []}]}
+ end.
+
+