#!/bin/bash

me=`whoami`
if [ ${me} != game ];then
   echo "ERROR su game please !!!"
   exit 1
fi

source /etc/profile

_script_root_=$(cd "$(dirname "$0")"; pwd)
cd ${_script_root_}

#bin/shutdown.sh
_pid=`ps -ef | grep ${_script_root_} | grep -v $0 |grep -v grep | awk '{print $2}' `
echo ${_pid}
if [ "${_pid}k" != "k" ];then
    kill -9 ${_pid}
fi

#/bin/rm -rf temp/* logs/* work/* conf/Catalina/* 

sleep 5

bin/startup.sh & 
wait
