日日操夜夜添-日日操影院-日日草夜夜操-日日干干-精品一区二区三区波多野结衣-精品一区二区三区高清免费不卡

公告:魔扣目錄網(wǎng)為廣大站長提供免費收錄網(wǎng)站服務,提交前請做好本站友鏈:【 網(wǎng)站目錄:http://www.ylptlb.cn 】, 免友鏈快審服務(50元/站),

點擊這里在線咨詢客服
新站提交
  • 網(wǎng)站:51998
  • 待審:31
  • 小程序:12
  • 文章:1030137
  • 會員:747

#!/bin/sh
#
# Appctrl	This shell script takes care of starting and stopping
#		the VccpDataServer (vccpdsctrl).
#
##########
# jar包存放的位置
prog_path="/usr/local/app/admin"
# jar包名稱
prog_name="admin-1.1.0"
exec="JAVA -Xms1024m -Xmx1024m -jar $prog_path""/""$prog_name"".jar"
#查看進程號
prog_pid=`ps -ef | grep $prog_name | grep -v grep | cut -c 10- | cut -c -5|sed 's/ //g'`
prog_time=`date --date='0 days ago' "+%Y/%m/%d %H:%M:%S"`
# get_pid
get_pid(){
    prog_pid=`ps -ef | grep $prog_name | grep -v grep | cut -c 10- | cut -c -5|sed 's/ //g'`
    echo $prog_pid
}
start(){
   prog_pid=$(get_pid);
   if [ -n "$prog_pid" ]; then
	echo ${prog_time} "$prog_name (pid:$prog_pid) ,and it's running."
	return 1
   fi
   echo ${prog_time} "$prog_name Starting ..."
   #export JAVA_HOME=/home/javahome
   #export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
   #export PATH=$PATH:$JAVA_HOME/bin
   echo $exec
   nohup $exec >/dev/null 2>&1 &
   
   sleep 10

   prog_pid=$(get_pid);   
   if [ -z "$prog_pid" ]; then
	echo ${prog_time} "Start $prog_name is failed."
	return 2
   fi  
   echo ${prog_time} "$prog_name (pid:$prog_pid) is running."
   echo ${prog_time} "Start $prog_name is ok."
   return 0   
}

stop(){
   echo ${prog_time} "$prog_name Stoping..."
   prog_pid=$(get_pid);
   if [ -n "$prog_pid" ]; then
	echo ${prog_time} "Found $prog_name (pid:$prog_pid)"	
	kill -9 $prog_pid
   fi

   sleep 3

   prog_pid=$(get_pid);
   if [ -n "$prog_pid" ]; then	
	echo ${prog_time} "Stop $prog_name is failed."
	return 1
   fi
   echo ${prog_time} "Stop $prog_name is ok."
   return 0
}
status(){
   prog_pid=$(get_pid);
   if [ -n "$prog_pid" ]; then
	echo ${prog_time} "$prog_name (pid:$prog_pid) is running..."
	return 0
   fi
   echo ${prog_time} "$prog_name is stoped."
   return 1
}

restart(){
    stop
    start
}

# See how we were called.
case "$1" in
  start)
    start
    ;;
  stop)
    stop
    ;;
  status)
    status
    ;;
  restart)
    restart
    ;;
  *)
    echo $"Usage: $0 {start|stop|status|restart}"
    exit 2
esac

exit $?

分享到:
標簽:jar
用戶無頭像

網(wǎng)友整理

注冊時間:

網(wǎng)站:5 個   小程序:0 個  文章:12 篇

  • 51998

    網(wǎng)站

  • 12

    小程序

  • 1030137

    文章

  • 747

    會員

趕快注冊賬號,推廣您的網(wǎng)站吧!
最新入駐小程序

數(shù)獨大挑戰(zhàn)2018-06-03

數(shù)獨一種數(shù)學游戲,玩家需要根據(jù)9

答題星2018-06-03

您可以通過答題星輕松地創(chuàng)建試卷

全階人生考試2018-06-03

各種考試題,題庫,初中,高中,大學四六

運動步數(shù)有氧達人2018-06-03

記錄運動步數(shù),積累氧氣值。還可偷

每日養(yǎng)生app2018-06-03

每日養(yǎng)生,天天健康

體育訓練成績評定2018-06-03

通用課目體育訓練成績評定