mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-11-05 11:52:10 +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
|
# Loop to start binary the specified number of times
|
||||||
for ((i=0; i<count; i++)); do
|
for ((i=0; i<count; i++)); do
|
||||||
echo "Starting $binary instance $i: $bin_full_path -i $i -c $OPENIM_OUTPUT_CONFIG"
|
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")
|
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) &
|
nohup "${cmd[@]}" >> "${LOG_FILE}" 2> >(tee -a "$ERR_LOG_FILE" | while read line; do echo -e "\e[31m${line}\e[0m"; done >&2) &
|
||||||
done
|
done
|
||||||
|
|||||||
@ -32,10 +32,10 @@ source "$OPENIM_SCRIPTS/bricks.sh"
|
|||||||
result=$(check_binaries_running)
|
result=$(check_binaries_running)
|
||||||
ret_val=$?
|
ret_val=$?
|
||||||
if [ $ret_val -eq 0 ]; then
|
if [ $ret_val -eq 0 ]; then
|
||||||
echo "All binaries are running."
|
echo "All services are running normally."
|
||||||
else
|
else
|
||||||
|
echo "Some services are not running as expected."
|
||||||
echo "$result"
|
echo "$result"
|
||||||
echo "abort..."
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user