diff --git a/distribution/bin/shutdown.sh b/distribution/bin/shutdown.sh index e3e14fedd86..5394e60be31 100644 --- a/distribution/bin/shutdown.sh +++ b/distribution/bin/shutdown.sh @@ -15,7 +15,7 @@ cd `dirname $0`/../target target_dir=`pwd` -pid=`ps ax | grep -i 'nacos.nacos' | grep ${target_dir} | grep java | grep -v grep | awk '{print $1}'` +pid=`pgrep -f nacos.nacos` if [ -z "$pid" ] ; then echo "No nacosServer running." exit -1; diff --git a/distribution/bin/startup.sh b/distribution/bin/startup.sh index 3786cf405ad..93027748dfe 100644 --- a/distribution/bin/startup.sh +++ b/distribution/bin/startup.sh @@ -146,4 +146,4 @@ else nohup "$JAVA" "$JAVA_OPT_EXT_FIX" ${JAVA_OPT} nacos.nacos >> ${BASE_DIR}/logs/start.out 2>&1 & fi -echo "nacos is starting,you can check the ${BASE_DIR}/logs/start.out" +echo "nacos is starting. you can check the ${BASE_DIR}/logs/start.out"