[ejabberd] ejabberd -heart on Debian

Fritz Kron frz at domaintechnik.at
Fri Feb 4 15:37:45 MSK 2005


Hi,

Last night ejabberd stopped without warnings and log entries! I was just jabbering so i restarted ejabberd "on the fly" without having an outage. 
For automatic restart of ejabberd on fails "-heart" should do the trick, so I added to  /usr/sbin/ejabberd startscript from debian "-heart" and 
the export HEART_COMMAND is this ok? or did I miss something?

kind regards, Fritz

---
/usr/sbin/ejabberd:

#!/bin/sh

[ -f /etc/default/ejabberd ] && . /etc/default/ejabberd

if [ -r /var/lib/ejabberd/.erlang.cookie ]
then
    HOME=/var/lib/ejabberd
    export HOME
fi

CONFIG=/etc/ejabberd/ejabberd.cfg
LOG=/var/log/ejabberd/ejabberd.log
SASL_LOG=/var/log/ejabberd/sasl.log
SPOOL=/var/lib/ejabberd
export HEART_COMMAND="/etc/init.d/ejabberd start"

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 \
    -heart \
    -ejabberd config \"$CONFIG\" log_path \"$LOG\" \
    -sasl sasl_error_logger \{file,\"$SASL_LOG\"\} \
    -mnesia dir \"$SPOOL\" \
    $ERL_OPTIONS $ARGS "$@"


-- 
-
* Friedrich Kron,  FK15-RIPE          
Domaintechnik.at - Internetdienstleistungen 
Friedrich Ledl, http://www.domaintechnik.at
                                            


More information about the ejabberd mailing list