From f6ff1904654ed6e6345c1e09ba1c4bb1144172d3 Mon Sep 17 00:00:00 2001 From: Daniel Bedeleanu Date: Sat, 18 Apr 2026 12:59:08 +0000 Subject: [PATCH] chore: replace macOS commands with Linux equivalents in start_server.sh - Remove /opt/homebrew/bin PATH injection (macOS Homebrew specific) - Replace ipconfig with hostname -I for IP detection (Linux native) - Add fallback to 'localhost' for edge cases --- start_server.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/start_server.sh b/start_server.sh index 810b152c..1f0834e3 100755 --- a/start_server.sh +++ b/start_server.sh @@ -15,9 +15,6 @@ if [ -f "$CONFIG_PATH" ]; then export $(grep -v '^#' "$CONFIG_PATH" | xargs) fi -# Add common Mac paths for npm/node -export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH" - echo "🚀 Starting TFM aInventory Stack with Dual Proxy..." # 1. Kill potentially hanging processes @@ -38,7 +35,7 @@ echo "📦 Updating Python dependencies..." pip install -q -r backend/requirements.txt # 4. Get Local IP and set environment variables -LOCAL_IP=$(ipconfig getifaddr en0 || ipconfig getifaddr en1 || echo "localhost") +LOCAL_IP=$(hostname -I | awk '{print $1}' || echo "localhost") export ALLOWED_ORIGINS="http://localhost:$FRONTEND_PORT,http://localhost:$BACKEND_PORT,https://localhost:$FRONTEND_SSL_PORT,https://localhost:$BACKEND_SSL_PORT,https://$LOCAL_IP:$FRONTEND_SSL_PORT,https://$LOCAL_IP:$BACKEND_SSL_PORT" export JWT_SECRET_KEY="${JWT_SECRET_KEY:-ephemeral-dev-key-$(date +%s)}" export DATA_DIR="$(cd "$(dirname "$0")" && pwd)/data"