mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-11-05 03:42:08 +08:00
50 lines
1.2 KiB
Bash
50 lines
1.2 KiB
Bash
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
OPENIM_SCRIPTS=$(dirname "${BASH_SOURCE[0]}")/
|
|
source "$OPENIM_SCRIPTS/bricks.sh"
|
|
|
|
|
|
# Assuming 'openim::util::host_platform' is defined in one of the sourced scripts or elsewhere.
|
|
# If not, you'll need to define it to return the appropriate platform directory name.
|
|
|
|
# Main function to start binaries
|
|
|
|
openim::log::print_blue "Starting tools primarily involves component verification and other preparatory tasks."
|
|
|
|
|
|
|
|
result=$(start_tools)
|
|
ret_val=$?
|
|
if [ $ret_val -ne 0 ]; then
|
|
openim::log::print_red "Some tools failed to start, details are as follows, abort start"
|
|
openim::log::print_red_no_time_stamp "$result"
|
|
exit 1
|
|
fi
|
|
|
|
echo "$result"
|
|
|
|
|
|
openim::log::print_green "All tools executed successfully"
|
|
openim::log::print_blue "Starting services involves multiple RPCs and API and may take some time. Please be patient"
|
|
|
|
kill_exist_binaries
|
|
|
|
result=$(check_binaries_stop)
|
|
ret_val=$?
|
|
|
|
if [ $ret_val -ne 0 ]; then
|
|
openim::log::print_red "Some services running, details are as follows, abort start"
|
|
openim::log::print_red_no_time_stamp "$result"
|
|
exit 1
|
|
fi
|
|
|
|
|
|
# Call the main function
|
|
result=$(start_binaries)
|
|
openim::log::print_blue_two_line "$result"
|
|
|
|
$OPENIM_SCRIPTS/check.sh
|
|
|