blob: aa65b1561cc2b6e40ca82787ec7060e6233576fb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
$NetBSD: patch-ae,v 1.3 2008/11/12 13:13:59 martti Exp $
Modified for pkgsrc
--- src/ejabberdctl.template.orig 2008-08-27 12:37:52.000000000 +0300
+++ src/ejabberdctl.template
@@ -14,8 +14,8 @@ ERLANG_NODE=$NODE@$HOST
ERL=@erl@
ROOTDIR=@rootdir@
EJABBERD_CONFIG_PATH=$ROOTDIR/etc/ejabberd/ejabberd.cfg
-LOGS_DIR=$ROOTDIR/var/log/ejabberd/
-EJABBERD_DB=$ROOTDIR/var/lib/ejabberd/db/$NODE
+LOGS_DIR=@EJABBERD_LOGDIR@
+EJABBERD_DB=@EJABBERD_VARDIR@/spool/ejabberd/db/$NODE
# read custom configuration
CONFIG=$ROOTDIR/etc/ejabberd/ejabberdctl.cfg
@@ -43,16 +43,16 @@ NAME=-name
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_EBIN=$ROOTDIR/lib/erlang/lib/@DISTNAME@/ebin
+EJABBERD_MSGS_PATH=$ROOTDIR/lib/erlang/lib/@DISTNAME@/priv/msgs
+EJABBERD_SO_PATH=$ROOTDIR/lib/erlang/lib/@DISTNAME@/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
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
+HOME=@EJABBERD_VARDIR@/spool/ejabberd/db/$NODE
# export global variables
export EJABBERD_CONFIG_PATH
|