You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by radjesh <ra...@yahoo.com> on 2005/03/31 16:17:52 UTC

Is there any way to know that James sever is up?

Hi,
    Is there any way to know that James server is running or if its not running then anyway to know that? say like when someone logs in to a system it should say that James is running or if its down then when someone logs in to a system it should say that James is not running, something like that. Any help will be most appreciated.
 
Thanks in advance
Rajesh




...life is what we make it, always has been, always will be. 
   Good Day    

 




		
---------------------------------
Do you Yahoo!?
 Yahoo! Small Business - Try our new resources site! 

Re: Is there any way to know that James sever is up?

Posted by Stefano Bagnara <io...@bago.org>.
>     Is there any way to know that James server is running or 
> if its not running then anyway to know that? say like when 

Look at phoenix.sh: in the start procedure it checks for the James_pid and
check wether the process is running before starting james.

PRGDIR=`dirname "$THIS_PROG"`
PHOENIX_HOME=`cd "$PRGDIR/.." ; pwd`

if [ -z "$PHOENIX_TMPDIR" ] ; then
  # Define the java.io.tmpdir to use for Phoenix
  PHOENIX_TMPDIR="$PHOENIX_HOME"/temp
  mkdir -p "$PHOENIX_TMPDIR"
fi

if [  -z "$PHOENIX_PID" ]
then
  PHOENIX_PID="$PHOENIX_TMPDIR/phoenix.pid"
fi

if [ -f $PHOENIX_PID ]
then
	if ps -p `cat $PHOENIX_PID ` >/dev/null 2>/dev/null
      then
      	echo "Already Running!!"
            exit 1
	fi
fi

PS: do not crosspost, please.

Stefano


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org