start.sh 481 Bytes
#! /usr/bin/ksh 
PRG="$0"
PRGDIR=`dirname "$PRG"`
APP_HOME=`cd "$PRGDIR/.." ; pwd`
. $APP_HOME/bin/setenv.sh

PRO_KEY=BomcManagerCenter
MAIN_CLASS="com.sitech.ibnms.BMCServerMain"

pro_count=`ps -ef | grep ${PRO_KEY} | grep -v grep | wc -l`
if [ $pro_count -lt 1 ]
then
        nohup java -D${PRO_KEY} ${MAIN_CLASS} 1>/dev/null 2>../logs/error.log &
        echo "BomcManagerCenter  startup "
else
        echo "there is already ${pro_count} process with key ${PRO_KEY} exists"
fi