File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ CURRENT_SCRIPT_PATH=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) " ; pwd)
4+ TCA_SCRIPT_ROOT=${TCA_SCRIPT_ROOT:- " $( cd $( dirname $CURRENT_SCRIPT_PATH ) ; pwd) " }
5+ TCA_PROJECT_PATH=${TCA_PROJECT_PATH:- " $( cd " $( dirname $TCA_SCRIPT_ROOT ) " ; pwd) " }
6+
7+
8+ source $TCA_SCRIPT_ROOT /utils.sh
9+
10+ function check_result() {
11+ name=$1
12+ ret=$2
13+ if [ " $ret " = " true" ]; then
14+ LOG_INFO " $name start: OK."
15+ return 0
16+ else
17+ LOG_ERROR " $name start: Failed."
18+ return 1
19+ fi
20+ }
21+
22+ function check_client_running() {
23+ client_result=$( check_target_process_exist " codepuppy" )
24+ if [ " $client_result " = " true" ]; then
25+ return 0
26+ else
27+ return 1
28+ fi
29+ }
30+
31+ function check_tca_client_status() {
32+ client_result=" "
33+ LOG_INFO " Check client start status..."
34+ check_client_running
35+ check_result " tca_client" " $client_result "
36+ }
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ source $TCA_SCRIPT_ROOT/server/start.sh
1616source $TCA_SCRIPT_ROOT /server/stop.sh
1717source $TCA_SCRIPT_ROOT /server/healthcheck.sh
1818source $TCA_SCRIPT_ROOT /client/init.sh
19+ source $TCA_SCRIPT_ROOT /client/check.sh
1920source $TCA_SCRIPT_ROOT /client/start.sh
2021source $TCA_SCRIPT_ROOT /client/stop.sh
2122
@@ -170,6 +171,7 @@ function tca_local_main() {
170171 tca_local_start
171172 sleep 2
172173 check_tca_local_status
174+ check_tca_client_status
173175 ;;
174176 install)
175177 tca_local_install $service
@@ -182,6 +184,7 @@ function tca_local_main() {
182184 ;;
183185 check)
184186 check_tca_local_status
187+ check_tca_client_status
185188 ;;
186189 log)
187190 get_tca_local_log
You can’t perform that action at this time.
0 commit comments