From 433f8aa8b1cd580134068a17f3bd2b89860c6e74 Mon Sep 17 00:00:00 2001 From: skiffer-git <72860476+skiffer-git@users.noreply.github.com> Date: Thu, 7 Mar 2024 19:47:13 +0800 Subject: [PATCH] Error:Confiquration file does notexist (#452) * Optimize the script * Optimize the script * Optimize the script * Optimize the script * delete wechat * delete wechat * delete wechat * Remove the logs directory * fix bug: Error:Confiquration file does notexist * debug * debug * debug * debug * debug * debug * debug * debug * debug * debug * debug * debug * debug * debug * fix --- scripts/check-all.sh | 11 ++++++++--- scripts/docker-start-all.sh | 2 ++ scripts/start-all.sh | 2 +- scripts/util.sh | 1 - 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/scripts/check-all.sh b/scripts/check-all.sh index 6b5d1640d..8a387967b 100755 --- a/scripts/check-all.sh +++ b/scripts/check-all.sh @@ -22,13 +22,11 @@ source $SCRIPTS_ROOT/util.sh logs_dir="$SCRIPTS_ROOT/../_output/logs" DOCKER_LOG_FILE="$logs_dir/chat-docker.log" - if is_running_in_container; then exec >> ${DOCKER_LOG_FILE} 2>&1 fi - DATA="$(date +%H:%M:%S)" echo "# Start Chat check-all.sh ${DATA}, For local deployments, use ./check-all.sh --print-screen" @@ -61,10 +59,17 @@ for binary_path in "${binary_full_paths[@]}"; do # Print the binary path in red for not running services echo -e "\033[0;31mService not running: $binary_path\033[0m" fi - exit 1 done + + + + if $all_services_running; then + for binary_path in "${binary_full_paths[@]}"; do + echo -e "\033[0;32mService running: $binary_path\033[0m" + done + # Print "Startup successful" in green echo -e "\033[0;32mAll chat services startup successful\033[0m" else diff --git a/scripts/docker-start-all.sh b/scripts/docker-start-all.sh index 61bb5aa87..b06c6e566 100755 --- a/scripts/docker-start-all.sh +++ b/scripts/docker-start-all.sh @@ -25,5 +25,7 @@ logs_dir="$SCRIPTS_ROOT/../_output/logs" DOCKER_LOG_FILE="$logs_dir/chat-docker.log" +${OPENIM_ROOT}/scripts/init-config.sh --skip + "${OPENIM_ROOT}"/scripts/start-all.sh tail -f ${DOCKER_LOG_FILE} diff --git a/scripts/start-all.sh b/scripts/start-all.sh index 811a2a58a..a2ae32a2a 100755 --- a/scripts/start-all.sh +++ b/scripts/start-all.sh @@ -64,7 +64,7 @@ if [ -f "$CONFIG_FILE" ]; then else echo "" # The file does not exist - echo "Error: Configuration file does not exist." + echo "Error: Configuration file does not exist." $CONFIG_FILE echo "+++ You need to execute 'make init' to generate the configuration file and then modify the configuration items." echo "" exit 1 diff --git a/scripts/util.sh b/scripts/util.sh index 2326668b0..3fb0e6c48 100755 --- a/scripts/util.sh +++ b/scripts/util.sh @@ -54,7 +54,6 @@ stop_services_with_name() { check_services_with_name() { local binary_path="$1" pgrep -f "$binary_path" > /dev/null 2>&1 - if [ $? -eq 0 ]; then if [ -z "$SUPPRESS_OUTPUT" ]; then echo "A process with the path $binary_path is running."