购物免费领券就上搜券网,搜券网Souquan.Net带你来省钱,搜券领券再买,更省钱,半价抢先购!

启动脚本

Linux 扩产网 1134℃ 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,您需要填写昵称和邮箱!

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