mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-11-05 03:42:08 +08:00
Script Refactoring
This commit is contained in:
parent
57cc797f08
commit
92650ab789
@ -27,9 +27,6 @@ start_binaries() {
|
||||
# Loop to start binary the specified number of times
|
||||
for ((i=0; i<count; i++)); do
|
||||
echo "Starting $binary instance $i: $bin_full_path -i $i -c $OPENIM_OUTPUT_CONFIG"
|
||||
#nohup "$bin_full_path" -i "$i" -c "$OPENIM_OUTPUT_CONFIG" > "test.log" 2>&1 &
|
||||
#nohup sh -c '"$bin_full_path" -i "$i" -c "$OPENIM_OUTPUT_CONFIG" 2>&1 | tee test.log' &
|
||||
#nohup ./run_my_command.sh "$bin_full_path" -i "$i" -c "$OPENIM_OUTPUT_CONFIG" > test.log 2>&1 &
|
||||
cmd=("$bin_full_path" -i "$i" -c "$OPENIM_OUTPUT_CONFIG")
|
||||
nohup "${cmd[@]}" >> "${LOG_FILE}" 2> >(tee -a "$ERR_LOG_FILE" | while read line; do echo -e "\e[31m${line}\e[0m"; done >&2) &
|
||||
done
|
||||
|
||||
@ -32,10 +32,10 @@ source "$OPENIM_SCRIPTS/bricks.sh"
|
||||
result=$(check_binaries_running)
|
||||
ret_val=$?
|
||||
if [ $ret_val -eq 0 ]; then
|
||||
echo "All binaries are running."
|
||||
echo "All services are running normally."
|
||||
else
|
||||
echo "Some services are not running as expected."
|
||||
echo "$result"
|
||||
echo "abort..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user