- update to ejabberd-2.0.1
- drop privilegies in ejabberdctl - add README.OpenBSD from maintainer Wiktor Izdebski; with tweaks from me tested by Wiktor Izdebski, Simon Kuhnle and sthen@ ok sthen@
This commit is contained in:
parent
e89abc1fca
commit
36a55958f3
@ -1,18 +1,18 @@
|
||||
# $OpenBSD: Makefile,v 1.7 2008/04/21 09:33:58 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.8 2008/06/02 18:13:15 martynas Exp $
|
||||
|
||||
COMMENT= jabber server written in Erlang
|
||||
|
||||
V= 1.1.4
|
||||
V= 2.0.1
|
||||
DISTNAME= ejabberd-$V
|
||||
PKGNAME= ${DISTNAME}p3
|
||||
DISTFILES= ejabberd-2.0.1_2.tar.gz
|
||||
|
||||
CATEGORIES= net
|
||||
|
||||
HOMEPAGE= http://ejabberd.jabber.ru/
|
||||
HOMEPAGE= http://www.ejabberd.im/
|
||||
|
||||
MAINTAINER= Wiktor Izdebski <vicviq@gmail.com>
|
||||
|
||||
# GPL
|
||||
# GPLv2
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
@ -36,7 +36,8 @@ FAKE_FLAGS+= EJABBERDDIR=${WRKINST}/${PREFIX}/lib/ejabberd \
|
||||
USE_GMAKE= Yes
|
||||
CONFIGURE_STYLE= gnu
|
||||
SHARED_ONLY= Yes
|
||||
CONFIGURE_ARGS+= --enable-mod_pubsub \
|
||||
CONFIGURE_ARGS+= --disable-pam \
|
||||
--enable-mod_pubsub \
|
||||
--enable-mod_irc \
|
||||
--enable-mod_muc \
|
||||
--enable-eldap \
|
||||
@ -57,29 +58,21 @@ WRKSRC= ${WRKDIST}/src
|
||||
|
||||
NO_REGRESS= Yes
|
||||
|
||||
SUBST_VARS= TRUEPREFIX LOCALBASE EJDBDIR EJLOGDIR JABBERDUSER
|
||||
|
||||
post-install:
|
||||
${INSTALL_SCRIPT} ${FILESDIR}/ejabberd ${PREFIX}/sbin/
|
||||
${INSTALL_SCRIPT} ${FILESDIR}/ejabberdctl ${PREFIX}/bin/
|
||||
${INSTALL_DATA} ${FILESDIR}/ejabberd.inetrc ${PREFIX}/share/examples/ejabberd/
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/ejabberd
|
||||
cd ${WRKDIST}/examples && \
|
||||
find . -type d -exec ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/ejabberd/{} \; && \
|
||||
find . ! -type d -exec ${INSTALL_DATA} {} ${PREFIX}/share/examples/ejabberd/{} \;
|
||||
find . ! -type d -exec ${SUBST_CMD} -c {} ${PREFIX}/share/examples/ejabberd/{} \;
|
||||
${INSTALL_DATA} ${WRKSRC}/odbc/pg.sql ${PREFIX}/share/examples/ejabberd/
|
||||
${INSTALL_DATA} ${WRKSRC}/odbc/mysql.sql ${PREFIX}/share/examples/ejabberd/
|
||||
cd ${WRKDIST}/doc && \
|
||||
find . -type d -exec ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/ejabberd/{} \; && \
|
||||
find . -name '*.html' -exec ${INSTALL_DATA} {} ${PREFIX}/share/doc/ejabberd/{} \; && \
|
||||
find . -name '*.png' -exec ${INSTALL_DATA} {} ${PREFIX}/share/doc/ejabberd/{} \;
|
||||
perl -pi -e "s,!!LOCALBASE!!,${LOCALBASE},g;" \
|
||||
-e "s,!!SYSCONFDIR!!,${SYSCONFDIR},g;" \
|
||||
-e "s,!!EJDBDIR!!,${EJDBDIR},g;" \
|
||||
-e "s,!!EJLOGDIR!!,${EJLOGDIR},g;" \
|
||||
-e "s,!!JABBERDUSER!!,${JABBERDUSER},g;" \
|
||||
${PREFIX}/sbin/ejabberd
|
||||
perl -pi -e "s,!!LOCALBASE!!,${LOCALBASE},g;" \
|
||||
-e "s,!!EJDBDIR!!,${EJDBDIR},g;" \
|
||||
-e "s,!!JABBERDUSER!!,${JABBERDUSER},g;" \
|
||||
${PREFIX}/bin/ejabberdctl
|
||||
${SUBST_CMD} -c ${FILESDIR}/README.OpenBSD ${PREFIX}/share/doc/ejabberd/README.OpenBSD
|
||||
${SUBST_CMD} ${PREFIX}/sbin/ejabberdctl
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
MD5 (ejabberd-1.1.4.tar.gz) = ZenNNG8Roor7rP4de+OjOw==
|
||||
RMD160 (ejabberd-1.1.4.tar.gz) = THJUgSmwGW/wCWvYWTbgdQ/E174=
|
||||
SHA1 (ejabberd-1.1.4.tar.gz) = 229SHUXeziAN5OtvyWfGRyjo9qM=
|
||||
SHA256 (ejabberd-1.1.4.tar.gz) = 3NYbcsUi7ud6tWInsW11/VdB7+K5uaih0+1+78Kn5PY=
|
||||
SIZE (ejabberd-1.1.4.tar.gz) = 846059
|
||||
MD5 (ejabberd-2.0.1_2.tar.gz) = nJQXq43DNAlOx6YRAWxybg==
|
||||
RMD160 (ejabberd-2.0.1_2.tar.gz) = pVYabFCLu5hGo1EYntWq0vX7Ze4=
|
||||
SHA1 (ejabberd-2.0.1_2.tar.gz) = f7sh64cgbBtA5SNJJ+LWog3mYUk=
|
||||
SHA256 (ejabberd-2.0.1_2.tar.gz) = pTNVF6RD6A2uRpijNCOFggHWma8Y0rU7J5oq0XGRatQ=
|
||||
SIZE (ejabberd-2.0.1_2.tar.gz) = 1054739
|
||||
|
60
net/ejabberd/files/README.OpenBSD
Normal file
60
net/ejabberd/files/README.OpenBSD
Normal file
@ -0,0 +1,60 @@
|
||||
* Migration
|
||||
When moving database between machines, or upgrading from 1.1.x to
|
||||
2.x.x version you will need to follow the instructions available at
|
||||
http://www.ejabberd.im/migrate-host
|
||||
Node name is by default set to ejabberd@`hostname -s`
|
||||
|
||||
|
||||
* Configuration
|
||||
* DNS
|
||||
SRV records for your server can make your life easier. Example
|
||||
records:
|
||||
_jabber._tcp.example.org. SRV 5 0 5269 host.example.org.
|
||||
_xmpp-server._tcp.example.org. SRV 5 0 5269 host.example.org.
|
||||
_xmpp-client._tcp.example.org. SRV 5 0 5222 host.example.org.
|
||||
|
||||
* Configuration file
|
||||
Set up the hostnames served by the server:
|
||||
{hosts, ["example.net", "example.com", "example.org"]}.
|
||||
Add administrative user
|
||||
{acl, admin, {user, "ermine", "example.org"}}.
|
||||
If you want to disallow in-band registration of users:
|
||||
{access, register, [{deny, all}]}.
|
||||
Users to get notifications about created new accounts:
|
||||
{registration_watchers, ["admin1@example.org"]},
|
||||
|
||||
|
||||
* Running
|
||||
Control is done using ${LOCALBASE}/sbin/ejabberdctl, run it without
|
||||
arguments for list of possible commands and flags. It needs to be
|
||||
executed as either root or _ejabberd user.
|
||||
|
||||
To start ejabberd at boot time, you may insert the following
|
||||
into ${SYSCONFDIR}/rc.local:
|
||||
|
||||
if [ -x ${LOCALBASE}/sbin/ejabberd ]; then
|
||||
echo -n ' ejabberd'; ${LOCALBASE}/sbin/ejabberd
|
||||
fi
|
||||
|
||||
|
||||
|
||||
* Administration
|
||||
ejabberdctl has some commands for administration of the server. After
|
||||
starting ejabberd run ejabberdctl again for list of options.
|
||||
Another possibility, giving you more options, is the web interface,
|
||||
available at http://your.server:5280/admin/ where you need to log in
|
||||
as a user added to admin acl group, give your full jid and your
|
||||
account password
|
||||
|
||||
|
||||
* Using SSL
|
||||
The sample configuration enables SSL by default. You just need to
|
||||
generate the keys. Note that you should enter your domain name as the
|
||||
Common Name for your certificate.
|
||||
# openssl req -new -nodes -x509 -newkey rsa:4096 -days 365 \
|
||||
-keyout ${SYSCONFDIR}/ejabberd/myserver.pem -out ${SYSCONFDIR}/ejabberd/myserver.pem
|
||||
# chown root:_ejabberd ${SYSCONFDIR}/ejabberd/myserver.pem
|
||||
# chmod 640 ${SYSCONFDIR}/ejabberd/myserver.pem
|
||||
|
||||
To disable SSL comment out (prepend with %%) lines containing
|
||||
'certfile' and the whole block pertaining port 5223
|
@ -1,31 +0,0 @@
|
||||
#!/bin/sh
|
||||
PREFIX="!!LOCALBASE!!"
|
||||
EJLIBDIR="${PREFIX}/lib/ejabberd"
|
||||
EJDBDIR="!!EJDBDIR!!"
|
||||
EJLOGDIR="!!EJLOGDIR!!"
|
||||
|
||||
CONFDIR="!!SYSCONFDIR!!/ejabberd"
|
||||
configfile="${CONFDIR}/ejabberd.cfg"
|
||||
detached="-detached"
|
||||
|
||||
while getopts fc: opt
|
||||
do
|
||||
case "$opt" in
|
||||
c) configfile="$OPTARG";;
|
||||
f) detached="";;
|
||||
\?) # unknown flag
|
||||
echo >&2 \
|
||||
"usage: $0 [-c configfile] [-f]"
|
||||
exit 1;;
|
||||
esac
|
||||
done
|
||||
shift `expr $OPTIND - 1`
|
||||
|
||||
exec su -l !!JABBERDUSER!! ${PREFIX}/bin/erl \
|
||||
-kernel inetrc \"${CONFDIR}/ejabberd.inetrc\" \
|
||||
-noinput -pa ${EJLIBDIR}/ebin \
|
||||
-sname ejabberd -s ejabberd \
|
||||
-ejabberd config \"${configfile}\" \
|
||||
log_path \"${EJLOGDIR}/ejabberd.log\" \
|
||||
-sasl sasl_error_logger \{file,\"${EJLOGDIR}/sasl.log\"\} \
|
||||
-mnesia dir \"$EJDBDIR\" ${detached}
|
@ -1 +0,0 @@
|
||||
{file, resolv, "/etc/resolv.conf"}.
|
@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
PREFIX="!!LOCALBASE!!"
|
||||
EJLIBDIR="${PREFIX}/lib/ejabberd"
|
||||
ID=`id -g`
|
||||
EJID=`id -g !!JABBERDUSER!!`
|
||||
export HOME="!!EJDBDIR!!"
|
||||
|
||||
if [ "$ID" -ne 0 -a "$ID" -ne "$EJID" ]; then
|
||||
echo "this command can only be run by root and the _ejabberd user" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ X"$1" == "X" ]; then
|
||||
echo "not enough arguments" >&2
|
||||
exit 2
|
||||
fi
|
||||
echo "$1" | grep -q "@"
|
||||
if [ $? -ne 0 ]; then
|
||||
nodename="ejabberd@`hostname -s`"
|
||||
else
|
||||
nodename=""
|
||||
fi
|
||||
|
||||
if [ $ID -eq 0 ]; then
|
||||
exec su -l !!JABBERDUSER!! ${PREFIX}/bin/erl -noinput -pa ${EJLIBDIR}/ebin -sname ejabberdctl -s ejabberd_ctl -extra $nodename $@
|
||||
else
|
||||
exec ${PREFIX}/bin/erl -noinput -pa ${EJLIBDIR}/ebin -sname ejabberdctl -s ejabberd_ctl -extra $nodename $@
|
||||
fi
|
54
net/ejabberd/patches/patch-src_ejabberd_cfg_example
Normal file
54
net/ejabberd/patches/patch-src_ejabberd_cfg_example
Normal file
@ -0,0 +1,54 @@
|
||||
$OpenBSD: patch-src_ejabberd_cfg_example,v 1.1 2008/06/02 18:13:15 martynas Exp $
|
||||
--- src/ejabberd.cfg.example.orig Thu Feb 21 11:02:12 2008
|
||||
+++ src/ejabberd.cfg.example Sun Mar 30 23:11:59 2008
|
||||
@@ -113,7 +113,7 @@
|
||||
%% certificate, put the correct path to the
|
||||
%% file and uncomment this line:
|
||||
%%
|
||||
- %%{certfile, "/path/to/ssl.pem"}, starttls,
|
||||
+ {certfile, "${SYSCONFDIR}/ejabberd/myserver.pem"}, starttls,
|
||||
|
||||
{access, c2s},
|
||||
{shaper, c2s_shaper},
|
||||
@@ -123,12 +123,12 @@
|
||||
%%
|
||||
%% To enable the old SSL connection method in port 5223:
|
||||
%%
|
||||
- %%{5223, ejabberd_c2s, [
|
||||
- %% {access, c2s},
|
||||
- %% {shaper, c2s_shaper},
|
||||
- %% {certfile, "/path/to/ssl.pem"}, tls,
|
||||
- %% {max_stanza_size, 65536}
|
||||
- %% ]},
|
||||
+{5223, ejabberd_c2s, [
|
||||
+ {access, c2s},
|
||||
+ {shaper, c2s_shaper},
|
||||
+ {certfile, "${SYSCONFDIR}/ejabberd/myserver.pem"}, tls,
|
||||
+ {max_stanza_size, 65536}
|
||||
+ ]},
|
||||
|
||||
{5269, ejabberd_s2s_in, [
|
||||
{shaper, s2s_shaper},
|
||||
@@ -159,18 +159,18 @@
|
||||
%% Allowed values are: true or false.
|
||||
%% You must specify a certificate file.
|
||||
%%
|
||||
-%%{s2s_use_starttls, true}.
|
||||
+{s2s_use_starttls, true}.
|
||||
|
||||
%%
|
||||
%% s2s_certfile: Specify a certificate file.
|
||||
%%
|
||||
-%%{s2s_certfile, "/path/to/ssl.pem"}.
|
||||
+{s2s_certfile, "${SYSCONFDIR}/ejabberd/myserver.pem"}.
|
||||
|
||||
%%
|
||||
%% domain_certfile: Specify a different certificate for each served hostname.
|
||||
%%
|
||||
-%%{domain_certfile, "example.org", "/path/to/example_org.pem"}.
|
||||
-%%{domain_certfile, "example.com", "/path/to/example_com.pem"}.
|
||||
+%%{domain_certfile, "example.org", "${SYSCONFDIR}/ejabberd/example_org.pem"}.
|
||||
+%%{domain_certfile, "example.com", "${SYSCONFDIR}/ejabberd/example_com.pem"}.
|
||||
|
||||
%%
|
||||
%% S2S whitelist or blacklist
|
@ -1,15 +0,0 @@
|
||||
$OpenBSD: patch-src_ejabberd_s2s_in_erl,v 1.1 2007/12/19 22:55:30 sthen Exp $
|
||||
--- src/ejabberd_s2s_in.erl.orig Thu Dec 6 12:21:26 2007
|
||||
+++ src/ejabberd_s2s_in.erl Thu Dec 6 12:22:44 2007
|
||||
@@ -30,8 +30,9 @@
|
||||
|
||||
-include("ejabberd.hrl").
|
||||
-include("jlib.hrl").
|
||||
--include_lib("ssl/include/PKIX1Explicit88.hrl").
|
||||
--include_lib("ssl/include/PKIX1Implicit88.hrl").
|
||||
+-include_lib("ssl/pkix/PKIX1Explicit88.hrl").
|
||||
+-include_lib("ssl/pkix/PKIX1Implicit88.hrl").
|
||||
+-include_lib("ssl/pkix/OTP-PKIX.hrl").
|
||||
-include("XmppAddr.hrl").
|
||||
|
||||
-define(DICT, dict).
|
169
net/ejabberd/patches/patch-src_ejabberdctl_template
Normal file
169
net/ejabberd/patches/patch-src_ejabberdctl_template
Normal file
@ -0,0 +1,169 @@
|
||||
$OpenBSD: patch-src_ejabberdctl_template,v 1.1 2008/06/02 18:13:15 martynas Exp $
|
||||
--- src/ejabberdctl.template.orig Tue May 20 12:22:03 2008
|
||||
+++ src/ejabberdctl.template Sun Jun 1 21:08:43 2008
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# define default configuration
|
||||
-POLL=true
|
||||
+POLL=false
|
||||
SMP=auto
|
||||
ERL_MAX_PORTS=32000
|
||||
ERL_PROCESSES=250000
|
||||
@@ -9,15 +9,17 @@ ERL_MAX_ETS_TABLES=1400
|
||||
|
||||
# define default environment variables
|
||||
NODE=ejabberd
|
||||
-HOST=localhost
|
||||
+HOST=`hostname -s`
|
||||
ERLANG_NODE=$NODE@$HOST
|
||||
ROOTDIR=@rootdir@
|
||||
-EJABBERD_CONFIG_PATH=$ROOTDIR/etc/ejabberd/ejabberd.cfg
|
||||
-LOGS_DIR=$ROOTDIR/var/log/ejabberd/
|
||||
-EJABBERD_DB=$ROOTDIR/var/lib/ejabberd/db/$NODE
|
||||
+EJABBERD_CONFIG_PATH=${SYSCONFDIR}/ejabberd/ejabberd.cfg
|
||||
+LOGS_DIR=${EJLOGDIR}
|
||||
+EJABBERD_DB=${EJDBDIR}/$NODE
|
||||
+ID=`id -g`
|
||||
+EJID=`id -g ${JABBERDUSER}`
|
||||
|
||||
# read custom configuration
|
||||
-CONFIG=$ROOTDIR/etc/ejabberd/ejabberdctl.cfg
|
||||
+CONFIG=${SYSCONFDIR}/ejabberd/ejabberdctl.cfg
|
||||
[ -f "$CONFIG" ] && . "$CONFIG"
|
||||
|
||||
# parse command line parameters
|
||||
@@ -36,23 +38,33 @@ while [ $# -ne 0 ] ; do
|
||||
esac
|
||||
done
|
||||
|
||||
+NODE="${ERLANG_NODE%@*}"
|
||||
+EJABBERD_DB=${EJDBDIR}/$NODE
|
||||
+
|
||||
NAME=-name
|
||||
[ "$ERLANG_NODE" = "${ERLANG_NODE%.*}" ] && NAME=-sname
|
||||
|
||||
ERLANG_OPTS="+K $POLL -smp $SMP +P $ERL_PROCESSES"
|
||||
|
||||
# define additional environment variables
|
||||
-EJABBERD_EBIN=$ROOTDIR/var/lib/ejabberd/ebin
|
||||
-EJABBERD_MSGS_PATH=$ROOTDIR/var/lib/ejabberd/priv/msgs
|
||||
-EJABBERD_SO_PATH=$ROOTDIR/var/lib/ejabberd/priv/lib
|
||||
-EJABBERD_BIN_PATH=$ROOTDIR/var/lib/ejabberd/priv/bin
|
||||
-EJABBERD_LOG_PATH=$LOGS_DIR/ejabberd.log
|
||||
-SASL_LOG_PATH=$LOGS_DIR/sasl.log
|
||||
+EJABBERD_EBIN=${LOCALBASE}/lib/ejabberd/ebin
|
||||
+EJABBERD_MSGS_PATH=${LOCALBASE}/lib/ejabberd/priv/msgs
|
||||
+EJABBERD_SO_PATH=${LOCALBASE}/lib/ejabberd/priv/lib
|
||||
+EJABBERD_BIN_PATH=${LOCALBASE}/lib/ejabberd/priv/bin
|
||||
+EJABBERD_LOG_PATH=$LOGS_DIR/${NODE}.log
|
||||
+SASL_LOG_PATH=$LOGS_DIR/${NODE}_sasl.log
|
||||
DATETIME=`date "+%Y%m%d-%H%M%S"`
|
||||
ERL_CRASH_DUMP=$LOGS_DIR/erl_crash_$DATETIME.dump
|
||||
-ERL_INETRC=$ROOTDIR/etc/ejabberd/inetrc
|
||||
-HOME=$ROOTDIR/var/lib/ejabberd
|
||||
+ERL_INETRC=${SYSCONFDIR}/ejabberd/inetrc
|
||||
+HOME=${EJDBDIR}
|
||||
|
||||
+# make sure we execute commands as proper user
|
||||
+if [ $ID -eq 0 ]; then
|
||||
+ EXEC_CMD='sudo -u ${JABBERDUSER}'
|
||||
+else
|
||||
+ EXEC_CMD=''
|
||||
+fi
|
||||
+
|
||||
# export global variables
|
||||
export EJABBERD_CONFIG_PATH
|
||||
export EJABBERD_MSGS_PATH
|
||||
@@ -63,23 +75,24 @@ export ERL_CRASH_DUMP
|
||||
export ERL_INETRC
|
||||
export ERL_MAX_PORTS
|
||||
export ERL_MAX_ETS_TABLES
|
||||
+export EXEC_CMD
|
||||
export HOME
|
||||
|
||||
-[ -d $EJABBERD_DB ] || mkdir -p $EJABBERD_DB
|
||||
-[ -d $LOGS_DIR ] || mkdir -p $LOGS_DIR
|
||||
-
|
||||
# Compatibility in ZSH
|
||||
#setopt shwordsplit 2>/dev/null
|
||||
|
||||
# start server
|
||||
start ()
|
||||
{
|
||||
- erl \
|
||||
+ $EXEC_CMD ${LOCALBASE}/bin/erl \
|
||||
$NAME $ERLANG_NODE \
|
||||
-noinput -detached \
|
||||
-pa $EJABBERD_EBIN \
|
||||
+ -kernel inetrc \"${ERL_INETRC}\" \
|
||||
-mnesia dir "\"$EJABBERD_DB\"" \
|
||||
-s ejabberd \
|
||||
+ -ejabberd config \"${EJABBERD_CONFIG_PATH}\" \
|
||||
+ log_path \"${EJABBERD_LOG_PATH}\" \
|
||||
-sasl sasl_error_logger \{file,\"$SASL_LOG_PATH\"\} \
|
||||
$ERLANG_OPTS $ARGS "$@"
|
||||
}
|
||||
@@ -103,7 +116,7 @@ debug ()
|
||||
echo "Press any key to continue"
|
||||
read foo
|
||||
echo ""
|
||||
- erl \
|
||||
+ $EXEC_CMD ${LOCALBASE}/bin/erl \
|
||||
$NAME ${NODE}debug \
|
||||
-remsh $ERLANG_NODE \
|
||||
$ERLANG_OPTS $ARGS "$@"
|
||||
@@ -127,19 +140,22 @@ live ()
|
||||
echo "Press any key to continue"
|
||||
read foo
|
||||
echo ""
|
||||
- erl \
|
||||
+ $EXEC_CMD ${LOCALBASE}/bin/erl \
|
||||
$NAME $ERLANG_NODE \
|
||||
$ERLANG_OPTS \
|
||||
-pa $EJABBERD_EBIN \
|
||||
+ -kernel inetrc \"${ERL_INETRC}\" \
|
||||
-mnesia dir "\"$EJABBERD_DB\"" \
|
||||
-s ejabberd \
|
||||
+ -ejabberd config \"${EJABBERD_CONFIG_PATH}\" \
|
||||
+ log_path \"${EJABBERD_LOG_PATH}\" \
|
||||
$ERLANG_OPTS $ARGS "$@"
|
||||
}
|
||||
|
||||
# common control function
|
||||
ctl ()
|
||||
{
|
||||
- erl \
|
||||
+ $EXEC_CMD ${LOCALBASE}/bin/erl \
|
||||
$NAME ejabberdctl \
|
||||
-noinput \
|
||||
-pa $EJABBERD_EBIN \
|
||||
@@ -159,6 +175,7 @@ ctl ()
|
||||
echo " --ctl-config file Config file of ejabberdctl: $CONFIG"
|
||||
echo " --logs dir Directory for logs: $LOGS_DIR"
|
||||
echo " --spool dir Database spool dir: $EJABBERD_DB"
|
||||
+ echo " --node node_name Ejabberd node name: $ERLANG_NODE"
|
||||
echo "";;
|
||||
esac
|
||||
return $result
|
||||
@@ -170,6 +187,20 @@ usage ()
|
||||
ctl
|
||||
exit
|
||||
}
|
||||
+
|
||||
+# check if we're a user that can execute commands
|
||||
+if [ "$ID" -ne 0 -a "$ID" -ne "$EJID" ]; then
|
||||
+ echo "this command can only be run by root or the _ejabberd user" >&2
|
||||
+ EXEC_CMD='false'
|
||||
+ usage
|
||||
+fi
|
||||
+
|
||||
+if [ ! -d $EJABBERD_DB -o ! -w $EJABBERD_DB ] ; then
|
||||
+ if [ ! -d ${EJABBERD_DB%/*} -o ! -w ${EJABBERD_DB%/*} ] ; then
|
||||
+ echo "${EJABBERD_DB} does not exist and I can't create it!"
|
||||
+ exit 1
|
||||
+ fi
|
||||
+fi
|
||||
|
||||
case $ARGS in
|
||||
' start') start;;
|
2
net/ejabberd/pkg/MESSAGE
Normal file
2
net/ejabberd/pkg/MESSAGE
Normal file
@ -0,0 +1,2 @@
|
||||
Please see ${PREFIX}/share/doc/ejabberd/README.OpenBSD
|
||||
for information about running ejabberd
|
@ -1,8 +1,9 @@
|
||||
@comment $OpenBSD: PLIST,v 1.2 2007/09/18 17:56:32 jasper Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.3 2008/06/02 18:13:15 martynas Exp $
|
||||
@newgroup _ejabberd:594
|
||||
@newuser _ejabberd:594:_ejabberd:daemon:ejabberd account:/var/db/ejabberd:/bin/sh
|
||||
%%SHARED%%
|
||||
bin/ejabberdctl
|
||||
@owner root
|
||||
@group wheel
|
||||
lib/ejabberd/
|
||||
lib/ejabberd/ebin/
|
||||
lib/ejabberd/ebin/ELDAPv3.beam
|
||||
@ -23,17 +24,25 @@ lib/ejabberd/ebin/ejabberd_auth_external.beam
|
||||
lib/ejabberd/ebin/ejabberd_auth_internal.beam
|
||||
lib/ejabberd/ebin/ejabberd_auth_ldap.beam
|
||||
lib/ejabberd/ebin/ejabberd_auth_odbc.beam
|
||||
@comment lib/ejabberd/ebin/ejabberd_auth_pam.beam
|
||||
lib/ejabberd/ebin/ejabberd_c2s.beam
|
||||
lib/ejabberd/ebin/ejabberd_c2s_config.beam
|
||||
lib/ejabberd/ebin/ejabberd_check.beam
|
||||
lib/ejabberd/ebin/ejabberd_config.beam
|
||||
lib/ejabberd/ebin/ejabberd_ctl.beam
|
||||
lib/ejabberd/ebin/ejabberd_frontend_socket.beam
|
||||
lib/ejabberd/ebin/ejabberd_hooks.beam
|
||||
lib/ejabberd/ebin/ejabberd_http.beam
|
||||
lib/ejabberd/ebin/ejabberd_http_bind.beam
|
||||
lib/ejabberd/ebin/ejabberd_http_poll.beam
|
||||
lib/ejabberd/ebin/ejabberd_listener.beam
|
||||
lib/ejabberd/ebin/ejabberd_local.beam
|
||||
lib/ejabberd/ebin/ejabberd_logger_h.beam
|
||||
lib/ejabberd/ebin/ejabberd_loglevel.beam
|
||||
lib/ejabberd/ebin/ejabberd_node_groups.beam
|
||||
lib/ejabberd/ebin/ejabberd_odbc.beam
|
||||
lib/ejabberd/ebin/ejabberd_odbc_sup.beam
|
||||
lib/ejabberd/ebin/ejabberd_rdbms.beam
|
||||
lib/ejabberd/ebin/ejabberd_receiver.beam
|
||||
lib/ejabberd/ebin/ejabberd_router.beam
|
||||
lib/ejabberd/ebin/ejabberd_s2s.beam
|
||||
@ -41,7 +50,9 @@ lib/ejabberd/ebin/ejabberd_s2s_in.beam
|
||||
lib/ejabberd/ebin/ejabberd_s2s_out.beam
|
||||
lib/ejabberd/ebin/ejabberd_service.beam
|
||||
lib/ejabberd/ebin/ejabberd_sm.beam
|
||||
lib/ejabberd/ebin/ejabberd_socket.beam
|
||||
lib/ejabberd/ebin/ejabberd_sup.beam
|
||||
lib/ejabberd/ebin/ejabberd_system_monitor.beam
|
||||
lib/ejabberd/ebin/ejabberd_tmp_sup.beam
|
||||
lib/ejabberd/ebin/ejabberd_update.beam
|
||||
lib/ejabberd/ebin/ejabberd_web.beam
|
||||
@ -50,19 +61,26 @@ lib/ejabberd/ebin/ejabberd_zlib.beam
|
||||
lib/ejabberd/ebin/ejd2odbc.beam
|
||||
lib/ejabberd/ebin/eldap.beam
|
||||
lib/ejabberd/ebin/eldap_filter.beam
|
||||
lib/ejabberd/ebin/eldap_pool.beam
|
||||
lib/ejabberd/ebin/eldap_utils.beam
|
||||
lib/ejabberd/ebin/extauth.beam
|
||||
lib/ejabberd/ebin/gen_iq_handler.beam
|
||||
lib/ejabberd/ebin/gen_mod.beam
|
||||
lib/ejabberd/ebin/gen_pubsub_node.beam
|
||||
lib/ejabberd/ebin/gen_pubsub_nodetree.beam
|
||||
lib/ejabberd/ebin/iconv.beam
|
||||
lib/ejabberd/ebin/idna.beam
|
||||
lib/ejabberd/ebin/jd2ejd.beam
|
||||
lib/ejabberd/ebin/jlib.beam
|
||||
lib/ejabberd/ebin/mod_adhoc.beam
|
||||
lib/ejabberd/ebin/mod_announce.beam
|
||||
lib/ejabberd/ebin/mod_caps.beam
|
||||
lib/ejabberd/ebin/mod_configure.beam
|
||||
lib/ejabberd/ebin/mod_configure2.beam
|
||||
lib/ejabberd/ebin/mod_disco.beam
|
||||
lib/ejabberd/ebin/mod_echo.beam
|
||||
lib/ejabberd/ebin/mod_http_bind.beam
|
||||
lib/ejabberd/ebin/mod_http_fileserver.beam
|
||||
lib/ejabberd/ebin/mod_irc.beam
|
||||
lib/ejabberd/ebin/mod_irc_connection.beam
|
||||
lib/ejabberd/ebin/mod_last.beam
|
||||
@ -73,7 +91,14 @@ lib/ejabberd/ebin/mod_muc_room.beam
|
||||
lib/ejabberd/ebin/mod_offline.beam
|
||||
lib/ejabberd/ebin/mod_offline_odbc.beam
|
||||
lib/ejabberd/ebin/mod_privacy.beam
|
||||
lib/ejabberd/ebin/mod_privacy_odbc.beam
|
||||
lib/ejabberd/ebin/mod_private.beam
|
||||
lib/ejabberd/ebin/mod_private_odbc.beam
|
||||
lib/ejabberd/ebin/mod_proxy65.beam
|
||||
lib/ejabberd/ebin/mod_proxy65_lib.beam
|
||||
lib/ejabberd/ebin/mod_proxy65_service.beam
|
||||
lib/ejabberd/ebin/mod_proxy65_sm.beam
|
||||
lib/ejabberd/ebin/mod_proxy65_stream.beam
|
||||
lib/ejabberd/ebin/mod_pubsub.beam
|
||||
lib/ejabberd/ebin/mod_register.beam
|
||||
lib/ejabberd/ebin/mod_roster.beam
|
||||
@ -86,7 +111,19 @@ lib/ejabberd/ebin/mod_vcard.beam
|
||||
lib/ejabberd/ebin/mod_vcard_ldap.beam
|
||||
lib/ejabberd/ebin/mod_vcard_odbc.beam
|
||||
lib/ejabberd/ebin/mod_version.beam
|
||||
lib/ejabberd/ebin/node_buddy.beam
|
||||
lib/ejabberd/ebin/node_club.beam
|
||||
lib/ejabberd/ebin/node_default.beam
|
||||
lib/ejabberd/ebin/node_dispatch.beam
|
||||
lib/ejabberd/ebin/node_pep.beam
|
||||
lib/ejabberd/ebin/node_private.beam
|
||||
lib/ejabberd/ebin/node_public.beam
|
||||
lib/ejabberd/ebin/nodetree_default.beam
|
||||
lib/ejabberd/ebin/nodetree_virtual.beam
|
||||
lib/ejabberd/ebin/odbc_queries.beam
|
||||
lib/ejabberd/ebin/p1_fsm.beam
|
||||
lib/ejabberd/ebin/p1_mnesia.beam
|
||||
lib/ejabberd/ebin/ram_file_io_server.beam
|
||||
lib/ejabberd/ebin/randoms.beam
|
||||
lib/ejabberd/ebin/sha.beam
|
||||
lib/ejabberd/ebin/shaper.beam
|
||||
@ -94,27 +131,44 @@ lib/ejabberd/ebin/stringprep.beam
|
||||
lib/ejabberd/ebin/stringprep_sup.beam
|
||||
lib/ejabberd/ebin/tls.beam
|
||||
lib/ejabberd/ebin/translate.beam
|
||||
lib/ejabberd/ebin/treap.beam
|
||||
lib/ejabberd/ebin/xml.beam
|
||||
lib/ejabberd/ebin/xml_stream.beam
|
||||
lib/ejabberd/priv/
|
||||
lib/ejabberd/priv/bin/
|
||||
lib/ejabberd/priv/lib/
|
||||
lib/ejabberd/priv/msgs/
|
||||
lib/ejabberd/priv/msgs/ca.msg
|
||||
lib/ejabberd/priv/msgs/cs.msg
|
||||
lib/ejabberd/priv/msgs/de.msg
|
||||
lib/ejabberd/priv/msgs/eo.msg
|
||||
lib/ejabberd/priv/msgs/es.msg
|
||||
lib/ejabberd/priv/msgs/fr.msg
|
||||
lib/ejabberd/priv/msgs/gl.msg
|
||||
lib/ejabberd/priv/msgs/it.msg
|
||||
lib/ejabberd/priv/msgs/ja.msg
|
||||
lib/ejabberd/priv/msgs/nl.msg
|
||||
lib/ejabberd/priv/msgs/no.msg
|
||||
lib/ejabberd/priv/msgs/pl.msg
|
||||
lib/ejabberd/priv/msgs/pt-br.msg
|
||||
lib/ejabberd/priv/msgs/pt.msg
|
||||
lib/ejabberd/priv/msgs/ru.msg
|
||||
lib/ejabberd/priv/msgs/sk.msg
|
||||
lib/ejabberd/priv/msgs/sv.msg
|
||||
lib/ejabberd/priv/msgs/th.msg
|
||||
lib/ejabberd/priv/msgs/tr.msg
|
||||
lib/ejabberd/priv/msgs/uk.msg
|
||||
sbin/ejabberd
|
||||
lib/ejabberd/priv/msgs/vi.msg
|
||||
lib/ejabberd/priv/msgs/wa.msg
|
||||
lib/ejabberd/priv/msgs/zh.msg
|
||||
@group bin
|
||||
sbin/ejabberdctl
|
||||
@comment sbin/ejabberdctl.bak
|
||||
@group wheel
|
||||
share/doc/ejabberd/
|
||||
share/doc/ejabberd/README.OpenBSD
|
||||
@comment share/doc/ejabberd/api/
|
||||
share/doc/ejabberd/dev.html
|
||||
share/doc/ejabberd/disco.png
|
||||
share/doc/ejabberd/discorus.png
|
||||
share/doc/ejabberd/features.html
|
||||
share/doc/ejabberd/guide.html
|
||||
@ -126,10 +180,12 @@ share/examples/ejabberd/
|
||||
@sample ${SYSCONFDIR}/ejabberd/
|
||||
share/examples/ejabberd/ejabberd.cfg
|
||||
@sample ${SYSCONFDIR}/ejabberd/ejabberd.cfg
|
||||
share/examples/ejabberd/ejabberd.inetrc
|
||||
@sample ${SYSCONFDIR}/ejabberd/ejabberd.inetrc
|
||||
share/examples/ejabberd/ejabberdctl.cfg
|
||||
@sample ${SYSCONFDIR}/ejabberd/ejabberdctl.cfg
|
||||
share/examples/ejabberd/extauth/
|
||||
share/examples/ejabberd/extauth/check_pass_null.pl
|
||||
share/examples/ejabberd/inetrc
|
||||
@sample ${SYSCONFDIR}/ejabberd/inetrc
|
||||
share/examples/ejabberd/mtr/
|
||||
share/examples/ejabberd/mtr/ejabberd
|
||||
share/examples/ejabberd/mtr/ejabberd-netbsd.sh
|
||||
|
Loading…
Reference in New Issue
Block a user