mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-01-13 17:25:11 +08:00
feat: fix scripts log path
Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
This commit is contained in:
parent
f8e3080be2
commit
7874c1499f
@ -43,7 +43,7 @@ for i in ${service_port_name[*]}; do
|
||||
port=$(ss -tunlp| grep openim | awk '{print $5}' | grep -w ${j} | awk -F '[:]' '{print $NF}')
|
||||
if [[ ${port} -ne ${j} ]]; then
|
||||
echo -e ${BACKGROUND_GREEN}${i}${COLOR_SUFFIX}${RED_PREFIX}" service does not start normally,not initiated port is "${COLOR_SUFFIX}${BACKGROUND_GREEN}${j}${COLOR_SUFFIX}
|
||||
echo -e ${RED_PREFIX}"please check $OPENIM_ROOT/logs/openIM.log "${COLOR_SUFFIX}
|
||||
echo -e ${RED_PREFIX}"please check $OPENIM_ROOT/logs/openIM.log"${COLOR_SUFFIX}
|
||||
exit -1
|
||||
else
|
||||
echo -e ${j}${GREEN_PREFIX}" port has been listening,belongs service is "${i}${COLOR_SUFFIX}
|
||||
|
||||
@ -61,7 +61,7 @@ sleep 1
|
||||
cd ${msg_gateway_binary_root}
|
||||
for ((i = 0; i < ${#ws_ports[@]}; i++)); do
|
||||
echo "==========================start msg_gateway server===========================">>$OPENIM_ROOT/logs/openIM.log
|
||||
nohup ./${openim_msggateway} --port ${rpc_ports[$i]} --ws_port ${ws_ports[$i]} --prometheus_port ${prome_ports[$i]} --config_folder_path ${configfile_path} >>$OPENIM_ROOT/logs/openIM.log 2>&1 &
|
||||
nohup ./${openim_msggateway} --port ${rpc_ports[$i]} --ws_port ${ws_ports[$i]} --prometheus_port ${prome_ports[$i]} --config_folder_path ${configfile_path} --configFolderPath ${log_path} >>$OPENIM_ROOT/logs/openIM.log 2>&1 &
|
||||
done
|
||||
|
||||
#Check launched service process
|
||||
|
||||
@ -55,9 +55,9 @@ sleep 1
|
||||
cd ${msg_transfer_binary_root}
|
||||
for ((i = 0; i < ${msg_transfer_service_num}; i++)); do
|
||||
prome_port=${prome_ports[$i]}
|
||||
cmd="nohup ./${openim_msgtransfer} --config_folder_path ${configfile_path}"
|
||||
cmd="nohup ./${openim_msgtransfer} --config_folder_path ${configfile_path} --configFolderPath ${log_path}"
|
||||
if [ $prome_port != "" ]; then
|
||||
cmd="$cmd --prometheus_port $prome_port --config_folder_path ${configfile_path}"
|
||||
cmd="$cmd --prometheus_port $prome_port --config_folder_path ${configfile_path} --configFolderPath ${log_path}"
|
||||
fi
|
||||
echo "==========================start msg_transfer server===========================">>$OPENIM_ROOT/logs/openIM.log
|
||||
$cmd >>$OPENIM_ROOT/logs/openIM.log 2>&1 &
|
||||
|
||||
@ -82,6 +82,7 @@ cmd_utils_source_root="$OPENIM_ROOT/cmd/openim-cmdutils/"
|
||||
# Global configuration file default dir
|
||||
config_path="$OPENIM_ROOT/config/config.yaml"
|
||||
configfile_path="$OPENIM_ROOT/config"
|
||||
log_path="$OPENIM_ROOT/log"
|
||||
|
||||
# servicefile dir path
|
||||
service_source_root=(
|
||||
|
||||
@ -100,9 +100,9 @@ for ((i = 0; i < ${#service_filename[*]}; i++)); do
|
||||
for ((j = 0; j < ${#service_ports[*]}; j++)); do
|
||||
#Start the service in the background
|
||||
if [ -z "${prome_ports[$j]}" ]; then
|
||||
cmd="./${service_filename[$i]} --port ${service_ports[$j]} --config_folder_path ${configfile_path}"
|
||||
cmd="./${service_filename[$i]} --port ${service_ports[$j]} --config_folder_path ${configfile_path} --configFolderPath ${log_path}"
|
||||
else
|
||||
cmd="./${service_filename[$i]} --port ${service_ports[$j]} --prometheus_port ${prome_ports[$j]} --config_folder_path ${configfile_path}"
|
||||
cmd="./${service_filename[$i]} --port ${service_ports[$j]} --prometheus_port ${prome_ports[$j]} --config_folder_path ${configfile_path} --configFolderPath ${log_path}"
|
||||
fi
|
||||
if [ $i -eq 0 -o $i -eq 1 ]; then
|
||||
cmd="./${service_filename[$i]} --port ${service_ports[$j]}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user