diff options
author | zhangab <zhanganbing@chinamobile.com> | 2018-11-06 12:35:53 +0800 |
---|---|---|
committer | zhangab <zhanganbing@chinamobile.com> | 2018-11-06 12:35:55 +0800 |
commit | 2e207eb9381305585c6eba891b65c3950ae9faeb (patch) | |
tree | b193a8b3a8099a4217258f737483c18ef421eaa2 /standalone/src/main/assembly/bin/stop.sh | |
parent | cebeb16eef83b6e95e702b1fd8954fd96fe995d1 (diff) |
Fix usecase-ui-server shutdown bug
Change-Id: I176795884f01192abf42c2fcc152a3f445a1528e
Issue-ID: USECASEUI-176
Signed-off-by: zhangab <zhanganbing@chinamobile.com>
Diffstat (limited to 'standalone/src/main/assembly/bin/stop.sh')
-rw-r--r-- | standalone/src/main/assembly/bin/stop.sh | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/standalone/src/main/assembly/bin/stop.sh b/standalone/src/main/assembly/bin/stop.sh index cacd1186..2f60715a 100644 --- a/standalone/src/main/assembly/bin/stop.sh +++ b/standalone/src/main/assembly/bin/stop.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright 2016-2017 ZTE Corporation. +# Copyright 2018 CMCC Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -27,22 +27,19 @@ cd $HOME; pwd echo @WORK_DIR@ $HOME -function save_service_pid(){ - service_pid=`ps -ef | grep $Main_Class | grep -v grep | awk '{print $2}'` - echo @service_pid@ $service_pid +function shutdown_usecaseui_server(){ + echo ================== usecase-ui server shutdown is starting ============================================= + curl -X POST http://localhost:8082/usecase-ui-server/shutdown + echo ================== usecase-ui server shutdown finished ============================================= } -function kill_service_process(){ - ps -p $service_pid - if [ $? == 0 ]; then - kill -9 $service_pid - fi +function shutdown_usecaseui_db(){ + echo ================== usecase-ui database shutdown is starting ============================================= + service mysql stop + echo ================== usecase-ui database shutdown finished ============================================= } -save_service_pid; -echo @C_CMD@ kill -9 $service_pid -kill_service_process; - -echo "Stoping mysql" -service mysql stop +shutdown_usecaseui_server; +shutdown_usecaseui_db; +echo "*****************usecase server shutdown finished*****************" sleep 1 |