Skip to content

Commit

Permalink
start_all doesn't kill the old service (#148)
Browse files Browse the repository at this point in the history
* jiaoben

Signed-off-by: hanzhixiao <[email protected]>

* jiaoben

Signed-off-by: hanzhixiao <[email protected]>

---------

Signed-off-by: hanzhixiao <[email protected]>
  • Loading branch information
hanzhixiao authored Aug 18, 2023
1 parent 2957be6 commit 1aab4b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/check_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ for i in ${service_port_name[*]}; do
list=$(cat $config_path | grep -w ${i} | awk -F '[:]' '{print $NF}')
list_to_string $list
for j in ${ports_array}; do
port=$(ss -tunlp| grep -E 'api|rpc|open_im' | awk '{print $5}' | grep -w ${j} | awk -F '[:]' '{print $NF}')
port=$(ps -ef |grep -E 'api|rpc|open_im' |awk '{print $10}'| grep -w ${j})
if [[ ${port} -ne ${j} ]]; then
echo -e ${YELLOW_PREFIX}${i}${COLOR_SUFFIX}${RED_PREFIX}" service does not start normally,not initiated port is "${COLOR_SUFFIX}${YELLOW_PREFIX}${j}${COLOR_SUFFIX}
echo -e ${RED_PREFIX}"please check ../logs/openIM.log "${COLOR_SUFFIX}
Expand Down
2 changes: 1 addition & 1 deletion scripts/start_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ cd $SCRIPTS_ROOT

for ((i = 0; i < ${#service_filename[*]}; i++)); do
#Check whether the service exists
service_name="ps |grep -w ${service_filename[$i]} |grep -v grep"
service_name="ps -aux|grep -w ${service_filename[$i]} |grep -v grep"
count="${service_name}| wc -l"

if [ $(eval ${count}) -gt 0 ]; then
Expand Down

0 comments on commit 1aab4b4

Please sign in to comment.