mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-10-27 22:12:15 +08:00
fix: start don't kill old process
Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>
This commit is contained in:
parent
dc419794e7
commit
ac7e909463
@ -50,11 +50,11 @@ if [ ${#rpc_ports[@]} -ne ${#ws_ports[@]} ]; then
|
||||
fi
|
||||
#Check if the service exists
|
||||
#If it is exists,kill this process
|
||||
check=$(ps aux | grep -w ./${openim_msggateway} | grep -v grep | wc -l)
|
||||
if [ $check -ge 1 ]; then
|
||||
oldPid=$(ps aux | grep -w ./${openim_msggateway} | grep -v grep | awk '{print $2}')
|
||||
kill -9 ${oldPid}
|
||||
fi
|
||||
#check=$(ps aux | grep -w ./${openim_msggateway} | grep -v grep | wc -l)
|
||||
#if [ $check -ge 1 ]; then
|
||||
# oldPid=$(ps aux | grep -w ./${openim_msggateway} | grep -v grep | awk '{print $2}')
|
||||
# kill -9 ${oldPid}
|
||||
#fi
|
||||
#Waiting port recycling
|
||||
sleep 1
|
||||
cd ${msg_gateway_binary_root}
|
||||
|
||||
@ -37,12 +37,12 @@ prome_ports=($ports_array)
|
||||
|
||||
#Check if the service exists
|
||||
#If it is exists,kill this process
|
||||
check=`ps | grep -w ./${openim_msgtransfer} | grep -v grep| wc -l`
|
||||
if [ $check -ge 1 ]
|
||||
then
|
||||
oldPid=`ps | grep -w ./${openim_msgtransfer} | grep -v grep|awk '{print $2}'`
|
||||
kill -9 $oldPid
|
||||
fi
|
||||
#check=`ps | grep -w ./${openim_msgtransfer} | grep -v grep| wc -l`
|
||||
#if [ $check -ge 1 ]
|
||||
#then
|
||||
#oldPid=`ps | grep -w ./${openim_msgtransfer} | grep -v grep|awk '{print $2}'`
|
||||
# kill -9 $oldPid
|
||||
#fi
|
||||
#Waiting port recycling
|
||||
sleep 1
|
||||
|
||||
|
||||
@ -44,11 +44,11 @@ prome_ports=($ports_array)
|
||||
|
||||
#Check if the service exists
|
||||
#If it is exists,kill this process
|
||||
check=$(ps | grep -w ./${push_name} | grep -v grep | wc -l)
|
||||
if [ $check -ge 1 ]; then
|
||||
oldPid=$(ps | grep -w ./${push_name} | grep -v grep | awk '{print $2}')
|
||||
kill -9 $oldPid
|
||||
fi
|
||||
#check=$(ps | grep -w ./${push_name} | grep -v grep | wc -l)
|
||||
#if [ $check -ge 1 ]; then
|
||||
# oldPid=$(ps | grep -w ./${push_name} | grep -v grep | awk '{print $2}')
|
||||
# kill -9 $oldPid
|
||||
#fi
|
||||
#Waiting port recycling
|
||||
sleep 1
|
||||
cd ${push_binary_root}
|
||||
|
||||
@ -35,11 +35,11 @@ logs_dir="$OPENIM_ROOT/logs"
|
||||
#Check if the service exists
|
||||
#If it is exists,kill this process
|
||||
check=`ps | grep -w ./${cron_task_name} | grep -v grep| wc -l`
|
||||
if [ $check -ge 1 ]
|
||||
then
|
||||
oldPid=`ps | grep -w ./${cron_task_name} | grep -v grep|awk '{print $2}'`
|
||||
kill -9 $oldPid
|
||||
fi
|
||||
#if [ $check -ge 1 ]
|
||||
#then
|
||||
#oldPid=`ps | grep -w ./${cron_task_name} | grep -v grep|awk '{print $2}'`
|
||||
# kill -9 $oldPid
|
||||
#fi
|
||||
#Waiting port recycling
|
||||
sleep 1
|
||||
|
||||
|
||||
@ -78,14 +78,14 @@ for ((i = 0; i < ${#service_filename[*]}; i++)); do
|
||||
service_name="ps |grep -w ${service_filename[$i]} |grep -v grep"
|
||||
count="${service_name}| wc -l"
|
||||
|
||||
if [ $(eval ${count}) -gt 0 ]; then
|
||||
pid="${service_name}| awk '{print \$2}'"
|
||||
echo "${service_filename[$i]} service has been started,pid:$(eval $pid)"
|
||||
echo "killing the service ${service_filename[$i]} pid:$(eval $pid)"
|
||||
#kill the service that existed
|
||||
kill -9 $(eval $pid)
|
||||
sleep 0.5
|
||||
fi
|
||||
# if [ $(eval ${count}) -gt 0 ]; then
|
||||
# pid="${service_name}| awk '{print \$2}'"
|
||||
# echo "${service_filename[$i]} service has been started,pid:$(eval $pid)"
|
||||
# echo "killing the service ${service_filename[$i]} pid:$(eval $pid)"
|
||||
# #kill the service that existed
|
||||
# kill -9 $(eval $pid)
|
||||
# sleep 0.5
|
||||
# fi
|
||||
cd $OPENIM_ROOT
|
||||
cd $BIN_DIR
|
||||
# Get the rpc port in the configuration file
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user