This is an automated email from the ASF dual-hosted git repository.
peacewong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/linkis.git
The following commit(s) were added to refs/heads/master by this push:
new 7f11981b0 bug-4768: fix the stop script prints invalid information
(#4769)
7f11981b0 is described below
commit 7f11981b00c92f4f2dcece8a9d901967f604f105
Author: aiceflower <[email protected]>
AuthorDate: Fri Jul 14 11:51:57 2023 +0800
bug-4768: fix the stop script prints invalid information (#4769)
* update linkis-stop-all scriipt
* update linkis-stop-all scriipt
---
linkis-dist/package/sbin/linkis-stop-all.sh | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/linkis-dist/package/sbin/linkis-stop-all.sh
b/linkis-dist/package/sbin/linkis-stop-all.sh
index 061ffd897..a560075a9 100644
--- a/linkis-dist/package/sbin/linkis-stop-all.sh
+++ b/linkis-dist/package/sbin/linkis-stop-all.sh
@@ -58,16 +58,22 @@ echo "<-------------------------------->"
function stopEC(){
echo "<-------------------------------->"
echo "Begin to stop EC"
-EC_STOP_CMD="ps -ef | grep EngineConnServer | grep -v grep | tr -s ' ' | cut
-d ' ' -f 2 | xargs sudo kill"
-if test -z "$SERVER_IP"
-then
- SERVER_IP=$local_host
+is_ec_service=`ps -ef | grep EngineConnServer | grep -v grep | tr -s ' ' | cut
-d ' ' -f 2`
+if [ "$is_ec_service" = "" ]; then
+ echo "no ec service runniing."
+else
+ EC_STOP_CMD="ps -ef | grep EngineConnServer | grep -v grep | tr -s ' ' | cut
-d ' ' -f 2 | xargs sudo kill"
+ if test -z "$SERVER_IP"
+ then
+ SERVER_IP=$local_host
+ fi
+ executeCMD $SERVER_IP "$EC_STOP_CMD"
fi
-executeCMD $SERVER_IP "$EC_STOP_CMD"
echo "server ENGINECONNs is stopped"
echo "<-------------------------------->"
}
+
#ec
stopEC
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]