mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-11-10 00:22:23 +08:00
Script Refactoring
This commit is contained in:
parent
9cc62ddf04
commit
c7b91c188d
@ -35,17 +35,15 @@ start_binaries() {
|
|||||||
start_tools() {
|
start_tools() {
|
||||||
# Assume tool_binaries=("ncpu" "infra")
|
# Assume tool_binaries=("ncpu" "infra")
|
||||||
for binary in "${tool_binaries[@]}"; do
|
for binary in "${tool_binaries[@]}"; do
|
||||||
echo $binary bbbbbbbbbbbbbb
|
|
||||||
local bin_full_path=$(get_tool_full_path "$binary")
|
local bin_full_path=$(get_tool_full_path "$binary")
|
||||||
# Assuming get_tool_full_path defines full path for each tool
|
|
||||||
cmd=("$bin_full_path" -c "$OPENIM_OUTPUT_CONFIG")
|
cmd=("$bin_full_path" -c "$OPENIM_OUTPUT_CONFIG")
|
||||||
echo "Starting ${cmd[@]}"
|
echo "Starting ${cmd[@]}"
|
||||||
"${cmd[@]}"
|
result="${cmd[@]}"
|
||||||
ret_val=$?
|
ret_val=$?
|
||||||
if [ $ret_val -eq 0 ]; then
|
if [ $ret_val -eq 0 ]; then
|
||||||
echo "Started $bin_full_path successfully."
|
echo "Started $bin_full_path successfully." $result
|
||||||
else
|
else
|
||||||
echo "Failed to start $bin_full_path with exit code $ret_val."
|
echo "Failed to start $bin_full_path with exit code $ret_val." $result
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user