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
This commit is contained in:
2026-04-18 12:59:08 +00:00
parent 4f0b027ec1
commit f6ff190465

View File

@@ -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"