Commit b1a78b74 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

Added some fixes that should improve logging, pid handling, and detecting of...

Added some fixes that should improve logging, pid handling, and detecting of openfire being running or not running.


git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@9754 b35dd754-fafc-0310-a699-88a17e54d16e
parent 339f7ac8
...@@ -110,11 +110,13 @@ start() { ...@@ -110,11 +110,13 @@ start() {
# Start daemons. # Start daemons.
echo -n "Starting openfire: " echo -n "Starting openfire: "
su -s /bin/sh -c "$OPENFIRE_RUN_CMD" $OPENFIRE_USER > nohup.out 2>&1 & rm -f nohup.out
su -s /bin/sh -c "nohup $OPENFIRE_RUN_CMD > $OPENFIRE_LOGDIR/nohup.out 2>&1 &" $OPENFIRE_USER
RETVAL=$? RETVAL=$?
PID=$! PID=`ps ax --width=1000 | grep openfire | grep startup.jar | awk '{print $1}'`
echo $PID
if [ $RETVAL -eq 0 -a ! -z "$OPENFIRE_PIDFILE" ]; then if [ $RETVAL -eq 0 -a ! -z "$PID" -a ! -z "$OPENFIRE_PIDFILE" ]; then
echo $PID > $OPENFIRE_PIDFILE echo $PID > $OPENFIRE_PIDFILE
fi fi
......
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