From bd80010cda2d91077249aadf14cd05b4ec6c8e46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AC=E6=98=8E?= <83812544+Ed1s0nZ@users.noreply.github.com> Date: Thu, 9 Jul 2026 19:24:20 +0800 Subject: [PATCH] Add files via upload --- run.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/run.sh b/run.sh index b7466012..b6b79bef 100644 --- a/run.sh +++ b/run.sh @@ -82,17 +82,11 @@ echo "" sleep 1 CONFIG_FILE="$ROOT_DIR/config.yaml" +EXAMPLE_CONFIG_FILE="$ROOT_DIR/config.example.yaml" VENV_DIR="$ROOT_DIR/venv" REQUIREMENTS_FILE="$ROOT_DIR/requirements.txt" BINARY_NAME="cyberstrike-ai" -# Check config file -if [ ! -f "$CONFIG_FILE" ]; then - error "Config file config.yaml not found" - info "Make sure you run this script from the project root" - exit 1 -fi - # Check Python environment check_python() { if ! command -v python3 >/dev/null 2>&1; then @@ -369,6 +363,11 @@ main() { # Environment checks info "Checking runtime environment..." check_python + if [ ! -f "$CONFIG_FILE" ] && [ ! -f "$EXAMPLE_CONFIG_FILE" ]; then + error "config.yaml not found, and config.example.yaml is missing" + info "The server binary creates config.yaml from config.example.yaml on first start" + exit 1 + fi check_go echo ""