From b2504fd398d42efd3fed7154eef78653b0241565 Mon Sep 17 00:00:00 2001 From: rushsky518 Date: Fri, 6 Sep 2019 11:40:36 +0800 Subject: [PATCH] #1507 close server from current dir --- distribution/bin/shutdown.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/distribution/bin/shutdown.sh b/distribution/bin/shutdown.sh index cb64555b1ce..3df4a03e6e3 100644 --- a/distribution/bin/shutdown.sh +++ b/distribution/bin/shutdown.sh @@ -12,8 +12,10 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +cd `dirname $0`/../target +target_dir=`pwd` -pid=`ps ax | grep -i 'nacos.nacos' |grep java | grep -v grep | awk '{print $1}'` +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;