Commit 47c396ca authored by guus's avatar guus

Checks if Openfire is already running (OF-67)

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@11479 b35dd754-fafc-0310-a699-88a17e54d16e
parent 68bd5f05
......@@ -107,8 +107,16 @@ start() {
OLD_PWD=`pwd`
cd $OPENFIRE_LOGDIR
# Start daemons.
echo -n "Starting openfire: "
# Check if the server is already running. We look only for the pid file
pid=`cat $OPENFIRE_PIDFILE 2>&1`
if [ "$?" = "0" ]; then
echo "Openfire is already running"
RETVAL=1
return
fi
# Start daemons.
echo -n "Starting openfire: "
rm -f nohup.out
su -s /bin/sh -c "nohup $OPENFIRE_RUN_CMD > $OPENFIRE_LOGDIR/nohup.out 2>&1 &" $OPENFIRE_USER
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment