Skip to content

Commit

Permalink
ISSUE #11212 (#11213)
Browse files Browse the repository at this point in the history
* Use pgrep in shutdown.sh

* Fix dot
  • Loading branch information
kubosuke authored Oct 9, 2023
1 parent 1c7b9b9 commit 7911eb0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion distribution/bin/shutdown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion distribution/bin/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 startingyou can check the ${BASE_DIR}/logs/start.out"
echo "nacos is starting. you can check the ${BASE_DIR}/logs/start.out"

0 comments on commit 7911eb0

Please sign in to comment.