--- ejabberdctl.template.orig 2016-03-09 03:31:00 UTC +++ ejabberdctl.template @@ -15,7 +15,8 @@ IEX={{bindir}}/iex EPMD={{bindir}}/epmd INSTALLUSER={{installuser}} -ERL_LIBS={{libdir}} +ERL_LIBS={{libdir}}/ejabberd +ERL_LIBS=$ERL_LIBS:{{libdir}}/ejabberd/lib # check the proper system user is used if defined if [ "$INSTALLUSER" != "" ] ; then @@ -31,14 +32,14 @@ fi done if [ `id -g` -eq `id -g $INSTALLUSER` ] ; then - EXEC_CMD="bash -c" + EXEC_CMD="%%LOCALBASE%%/bin/bash -c" fi if [ "$EXEC_CMD" = "false" ] ; then echo "This command can only be run by root or the user $INSTALLUSER" >&2 exit 4 fi else - EXEC_CMD="bash -c" + EXEC_CMD="%%LOCALBASE%%/bin/bash -c" fi # parse command line parameters @@ -73,10 +74,10 @@ EJABBERD_CONFIG_PATH=$ETC_DIR/ejabberd.yml fi if [ "$LOGS_DIR" = "" ] ; then - LOGS_DIR={{localstatedir}}/log/ejabberd + LOGS_DIR=/var/log/ejabberd fi if [ "$SPOOL_DIR" = "" ] ; then - SPOOL_DIR={{localstatedir}}/lib/ejabberd + SPOOL_DIR=/var/spool/ejabberd fi if [ "$EJABBERD_DOC_PATH" = "" ] ; then EJABBERD_DOC_PATH={{docdir}} @@ -354,7 +355,7 @@ # using flock if available. Expects a linux-style # flock that can lock a file descriptor. MAXCONNID=100 - CONNLOCKDIR={{localstatedir}}/lock/ejabberdctl + CONNLOCKDIR={{localstatedir}}/run/ejabberdctl FLOCK=/usr/bin/flock if [ ! -x "$FLOCK" ] || [ ! -d "$CONNLOCKDIR" ] ; then JOT=/usr/bin/jot