diff --git a/distribution/bin/shutdown.sh b/distribution/bin/shutdown.sh index cb64555b1..fbf7ad01e 100644 --- a/distribution/bin/shutdown.sh +++ b/distribution/bin/shutdown.sh @@ -13,7 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -pid=`ps ax | grep -i 'nacos.nacos' |grep java | grep -v grep | awk '{print $1}'` +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}'` if [ -z "$pid" ] ; then echo "No nacosServer running." exit -1;