25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

* src/ejabberdctl.template: Update environment variable names

SVN Revision: 1449
This commit is contained in:
Badlop 2008-07-16 10:55:50 +00:00
parent 0b3f830188
commit ece37b1dad
2 changed files with 25 additions and 21 deletions

View File

@ -1,3 +1,7 @@
2008-07-16 Badlop <badlop@process-one.net>
* src/ejabberdctl.template: Update environment variable names
2008-07-15 Badlop <badlop@process-one.net> 2008-07-15 Badlop <badlop@process-one.net>
* src/ejabberdctl.template: Small fix so arguments of the command * src/ejabberdctl.template: Small fix so arguments of the command

View File

@ -15,12 +15,12 @@ ERL=@erl@
INSTALLUSER=@installuser@ INSTALLUSER=@installuser@
ETCDIR=@SYSCONFDIR@/ejabberd ETCDIR=@SYSCONFDIR@/ejabberd
EJABBERD_CONFIG_PATH=$ETCDIR/ejabberd.cfg EJABBERD_CONFIG_PATH=$ETCDIR/ejabberd.cfg
LOGDIR=@LOCALSTATEDIR@/log/ejabberd LOGS_DIR=@LOCALSTATEDIR@/log/ejabberd
SPOOLDIR=@LOCALSTATEDIR@/lib/ejabberd SPOOLDIR=@LOCALSTATEDIR@/lib/ejabberd
# read custom configuration # read custom configuration
CONFIG=$ETCDIR/ejabberdctl.cfg EJABBERDCTL_CONFIG_PATH=$ETCDIR/ejabberdctl.cfg
[ -f "$CONFIG" ] && . "$CONFIG" [ -f "$EJABBERDCTL_CONFIG_PATH" ] && . "$EJABBERDCTL_CONFIG_PATH"
# parse command line parameters # parse command line parameters
ARGS= ARGS=
@ -31,8 +31,8 @@ while [ $# -ne 0 ] ; do
--) break ;; --) break ;;
--node) ERLANG_NODE=$1; shift ;; --node) ERLANG_NODE=$1; shift ;;
--config) EJABBERD_CONFIG_PATH=$1 ; shift ;; --config) EJABBERD_CONFIG_PATH=$1 ; shift ;;
--ctl-config) CONFIG=$1 ; shift ;; --ctl-config) EJABBERDCTL_CONFIG_PATH=$1 ; shift ;;
--logs) LOGDIR=$1 ; shift ;; --logs) LOGS_DIR=$1 ; shift ;;
--spool) SPOOLDIR=$1 ; shift ;; --spool) SPOOLDIR=$1 ; shift ;;
*) ARGS="$ARGS $PARAM" ;; *) ARGS="$ARGS $PARAM" ;;
esac esac
@ -66,16 +66,16 @@ ERLANG_OPTS="+K $POLL -smp $SMP +P $ERL_PROCESSES $KERNEL_OPTS"
# define additional environment variables # define additional environment variables
EJABBERDDIR=@LIBDIR@/ejabberd EJABBERDDIR=@LIBDIR@/ejabberd
BEAMDIR=$EJABBERDDIR/ebin EJABBERD_EBIN_PATH=$EJABBERDDIR/ebin
PRIVDIR=$EJABBERDDIR/priv EJABBERD_PRIV_PATH=$EJABBERDDIR/priv
PBINDIR=$PRIVDIR/bin EJABBERD_BIN_PATH=$EJABBERD_PRIV_PATH/bin
SODIR=$PRIVDIR/lib EJABBERD_SO_PATH=$EJABBERD_PRIV_PATH/lib
MSGSDIR=$PRIVDIR/msgs EJABBERD_MSGS_PATH=$EJABBERD_PRIV_PATH/msgs
EJABBERD_LOG_PATH=$LOGDIR/ejabberd.log EJABBERD_LOG_PATH=$LOGS_DIR/ejabberd.log
SASL_LOG_PATH=$LOGDIR/sasl.log SASL_LOG_PATH=$LOGS_DIR/sasl.log
DATETIME=`date "+%Y%m%d-%H%M%S"` DATETIME=`date "+%Y%m%d-%H%M%S"`
ERL_CRASH_DUMP=$LOGDIR/erl_crash_$DATETIME.dump ERL_CRASH_DUMP=$LOGS_DIR/erl_crash_$DATETIME.dump
ERL_INETRC=$ETCDIR/inetrc ERL_INETRC=$ETCDIR/inetrc
HOME=$SPOOLDIR HOME=$SPOOLDIR
@ -84,10 +84,10 @@ HOME=$SPOOLDIR
# export global variables # export global variables
export EJABBERD_CONFIG_PATH export EJABBERD_CONFIG_PATH
export MSGSDIR export EJABBERD_MSGS_PATH
export EJABBERD_LOG_PATH export EJABBERD_LOG_PATH
export SODIR export EJABBERD_SO_PATH
export PBINDIR export EJABBERD_BIN_PATH
export ERL_CRASH_DUMP export ERL_CRASH_DUMP
export ERL_INETRC export ERL_INETRC
export ERL_MAX_PORTS export ERL_MAX_PORTS
@ -105,7 +105,7 @@ start ()
$EXEC_CMD "$ERL \ $EXEC_CMD "$ERL \
$NAME $ERLANG_NODE \ $NAME $ERLANG_NODE \
-noinput -detached \ -noinput -detached \
-pa $BEAMDIR \ -pa $EJABBERD_EBIN_PATH \
-mnesia dir \"\\\"$SPOOLDIR\\\"\" \ -mnesia dir \"\\\"$SPOOLDIR\\\"\" \
-s ejabberd \ -s ejabberd \
-sasl sasl_error_logger \\{file,\\\"$SASL_LOG_PATH\\\"\\} \ -sasl sasl_error_logger \\{file,\\\"$SASL_LOG_PATH\\\"\\} \
@ -157,7 +157,7 @@ live ()
echo "" echo ""
$EXEC_CMD "$ERL \ $EXEC_CMD "$ERL \
$NAME $ERLANG_NODE \ $NAME $ERLANG_NODE \
-pa $BEAMDIR \ -pa $EJABBERD_EBIN_PATH \
-mnesia dir \"\\\"$SPOOLDIR\\\"\" \ -mnesia dir \"\\\"$SPOOLDIR\\\"\" \
-s ejabberd \ -s ejabberd \
$ERLANG_OPTS $ARGS \"$@\"" $ERLANG_OPTS $ARGS \"$@\""
@ -170,7 +170,7 @@ ctl ()
$EXEC_CMD "$ERL \ $EXEC_CMD "$ERL \
$NAME ejabberdctl \ $NAME ejabberdctl \
-noinput \ -noinput \
-pa $BEAMDIR \ -pa $EJABBERD_EBIN_PATH \
-s ejabberd_ctl -extra $ERLANG_NODE $COMMAND" -s ejabberd_ctl -extra $ERLANG_NODE $COMMAND"
result=$? result=$?
case $result in case $result in
@ -184,8 +184,8 @@ ctl ()
echo "" echo ""
echo "Optional parameters when starting an ejabberd node:" echo "Optional parameters when starting an ejabberd node:"
echo " --config file Config file of ejabberd: $EJABBERD_CONFIG_PATH" echo " --config file Config file of ejabberd: $EJABBERD_CONFIG_PATH"
echo " --ctl-config file Config file of ejabberdctl: $CONFIG" echo " --ctl-config file Config file of ejabberdctl: $EJABBERDCTL_CONFIG_PATH"
echo " --logs dir Directory for logs: $LOGDIR" echo " --logs dir Directory for logs: $LOGS_DIR"
echo " --spool dir Database spool dir: $SPOOLDIR" echo " --spool dir Database spool dir: $SPOOLDIR"
echo " --node nodename ejabberd node name: $ERLANG_NODE" echo " --node nodename ejabberd node name: $ERLANG_NODE"
echo "";; echo "";;