Signed-off-by: hanzhixiao <709674996@qq.com>
pull/828/head
hanzhixiao 2 years ago
parent aeea8c3f21
commit 444af3d6ad

@ -70,13 +70,14 @@ cd $SCRIPTS_ROOT
# FIXME Put the shell script names here
need_to_start_server_shell=(
start_component_check.sh
start_rpc_service.sh
push_start.sh
msg_transfer_start.sh
msg_gateway_start.sh
start_cron.sh
)
chmod +x $i
start_component_check.sh
# Loop through the script names and execute them
for i in ${need_to_start_server_shell[*]}; do

@ -35,4 +35,8 @@ cmd="./${component_check}"
echo "==========================start components checking===========================">>$OPENIM_ROOT/logs/openIM.log
$cmd
if [ $? -eq 0 ]; then
exit 1
fi

@ -28,7 +28,7 @@ import (
const (
cfgPath = "../../../../../config/config.yaml"
minioHealthCheckDuration = 1
maxRetry = 10000
maxRetry = 100
componentStartErrCode = 6000
configErrCode = 6001
)
@ -78,6 +78,7 @@ func main() {
// Check Minio
if err := checkMinio(); err != nil {
if index := strings.Index(err.Error(), utils.IntToString(configErrCode)); index != -1 {
successPrint(fmt.Sprint("Minio starts successfully"))
warningPrint(fmt.Sprintf("%v. Please modify your config file", err.Error()))
} else {
errorPrint(fmt.Sprintf("Starting Minio failed: %v. Please make sure your Minio service has started", err.Error()))
@ -110,8 +111,9 @@ func main() {
successPrint(fmt.Sprint("Kafka starts successfully"))
}
successPrint(fmt.Sprint("All components starts successfully"))
break
os.Exit(0)
}
os.Exit(1)
}
func exactIP(urll string) string {
@ -275,5 +277,5 @@ func successPrint(s string) {
}
func warningPrint(s string) {
fmt.Printf("\x1b[%dmWarning: %v\x1b[0m\n", 33, s)
fmt.Printf("\x1b[%dmWarning: But %v\x1b[0m\n", 33, s)
}

Loading…
Cancel
Save