linux 下停止java jar包 shell

linux 下停止java jar包 shell

 http://injavawetrust.iteye.com

#!/bin/sh

APP_HOME=/home/ap/injavawetrust/batch
cd $APP_HOME
if [ -f BatchClient.pid ]; then
PID=$(cat BatchClient.pid)
kill -9 $PID
rm -f BatchClient.pid

echo "==========================="
echo "PID is $PID"

echo "stopping service ......."
sleep 1
 if [ -f BatchClient.pid ]; then

echo "stop service  fail"
  else
     echo  "stop service sucess"
  fi
else
 echo "==========================="
echo "warn:service is not started"
echo "==========================="
fi

posted on 2016-03-30 16:18  木鱼哥  阅读(552)  评论(0编辑  收藏  举报

导航