打折购物就上打折屋,打折屋Dazhewu.com带你来嗨,领券再买,更省钱,半价抢先购!

启动脚本

Linux 扩产网 103℃ 0评论
#!/bin/bash
#chkconfig: 2345 80 93
#description: ninghai
source /etc/profile
case "$1" in
start)
    cd /data/program/projects/yuantong
    sh start.sh
!
    echo "yuantong startup"
    ;;
stop)
    es_pid=`ps aux|grep yuantong-search-0.0.1-SNAPSHOT.jar | grep -v 'grep yuantong-search-0.0.1-SNAPSHOT.jar' | awk '{print $2}'`
    kill  $es_pid
    echo "yuantong stopped"
    ;;
restart)
    es_pid=`ps aux|grep  yuantong-search-0.0.1-SNAPSHOT.jar | grep -v 'grep  yuantong-search-0.0.1-SNAPSHOT.jar' | awk '{print $2}'`
    kill -9 $es_pid
    echo "yuantong stopped"
    cd /data/program/projects/yuantong
    sh start.sh
!
    echo "yuantong restart"
    ;;
*)
    echo "start|stop|restart"
    ;;
esac
exit $?

转载请注明:扩产网 » 启动脚本

喜欢 (5)
发表我的评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址