Files
open-im-server/scripts/start_all.sh
T

46 lines
1.8 KiB
Bash
Raw Normal View History

2023-06-30 23:22:58 +08:00
#!/usr/bin/env bash
2023-07-04 11:15:20 +08:00
# Copyright © 2023 OpenIM. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
2023-07-04 20:18:39 +08:00
#FIXME This script is the startup script for multiple servers.
#FIXME The full names of the shell scripts that need to be started are placed in the `need_to_start_server_shell` array.
2023-06-30 23:22:58 +08:00
2023-07-04 20:18:39 +08:00
#FIXME Put the shell script names here
2023-06-30 23:22:58 +08:00
need_to_start_server_shell=(
start_rpc_service.sh
push_start.sh
msg_transfer_start.sh
# sdk_svr_start.sh
msg_gateway_start.sh
start_cron.sh
)
2023-07-04 20:18:39 +08:00
2023-06-30 23:22:58 +08:00
time=`date +"%Y-%m-%d %H:%M:%S"`
2023-07-04 20:18:39 +08:00
echo "==========================================================" >> ../logs/openIM.log 2>&1 &
echo "==========================================================" >> ../logs/openIM.log 2>&1 &
echo "==========================================================" >> ../logs/openIM.log 2>&1 &
echo "==========server start time:${time}===========" >> ../logs/openIM.log 2>&1 &
echo "==========================================================" >> ../logs/openIM.log 2>&1 &
echo "==========================================================" >> ../logs/openIM.log 2>&1 &
echo "==========================================================" >> ../logs/openIM.log 2>&1 &
2023-06-30 23:22:58 +08:00
for i in ${need_to_start_server_shell[*]}; do
chmod +x $i
2023-07-04 20:18:39 +08:00
echo "=====================exec ${i}======================" >> ../logs/openIM.log
2023-06-30 23:22:58 +08:00
./$i
2023-07-04 20:18:39 +08:00
if [ $? -ne 0 ]; then
exit -1
2023-06-30 23:22:58 +08:00
fi
done