zoukankan      html  css  js  c++  java
  • es服务

    #!/bin/bash

    #chkconfig:2345 20 90

    #description: elastic service

    #processname: elastic

    ROOT_PATH=/es5/install

    case "$1" in

    start)

    su es5 -c "nohup /es5/esinstall/elasticsearch-5.4.0/bin/elasticsearch >> /dev/null &"

    ;;

    stop)

    psid=0

    checkpid(){

    javaps=`jps -l | grep elasticsearch`

    if [ -n "$javaps"]; then

    psid=`echo $javaps |awk '{print $1}'`

    else

    psid=0

    fi}

    checkpid

    if [ $psid -ne 0]; then

      echo -n "Stopping elasticsearch   (pid=$psid)"

      kill -9 psid

      if[ $? -eq 0 ];then

        echo "[OK]"

      else

        echo "Failed"

      fi

      checkpid

      if [ $psid -ne 0 ]; then

      kill -9 $psid

      fi

    else

    echo"elasticsearch is not running"

    fi

    ;;

    *)

    echo '参数错误'

    echo 'service esserver start|stop'

    ;;

    esac

    exit 0

    }

  • 相关阅读:
    WEB API&API
    event flow
    JS-for的衍生对象
    JS-function
    Object Constructor
    前端发展史
    JavaScript中document.getElementById和document.write
    正则表达式把Paul换成Ringo
    11th blog
    10th week blog
  • 原文地址:https://www.cnblogs.com/nicebaby/p/8066607.html
Copyright © 2011-2022 走看看