From c97bbb49b5812e549519c23c1dbf71530af8fb77 Mon Sep 17 00:00:00 2001 From: Opus Date: Fri, 24 Apr 2026 17:29:59 +0200 Subject: [PATCH] phase57 doctrine195 LAUNCH-CHROMES V3 8/8 UP | fix nohup disown au lieu de juste & | --remote-debugging-address=127.0.0.1 obligatoire | skip si port deja UP | 8/8 chromes UP verifie: google 9224 perplexity 9228 mistral 9226 anthropic 9223 deepseek 9225 poe 9227 hf 9229 openai 9222 --- .../opus-intents/launch-chromes-all.sh | 66 ++++++++----------- 1 file changed, 28 insertions(+), 38 deletions(-) diff --git a/ops-scripts/opus-intents/launch-chromes-all.sh b/ops-scripts/opus-intents/launch-chromes-all.sh index 587bf3479..b672b515d 100644 --- a/ops-scripts/opus-intents/launch-chromes-all.sh +++ b/ops-scripts/opus-intents/launch-chromes-all.sh @@ -1,43 +1,33 @@ #!/bin/bash -# launch-chromes-all.sh v2 - fix DISPLAY export (wave-AI-WEB-24avr fix) -export DISPLAY=:1 -echo "=== LAUNCHING 8 WEVIA CYBER CHROMES (CDP ports 9222-9229) ===" -echo "DISPLAY=$DISPLAY (Xvfb required)" -declare -A PROVIDERS=( - [openai]=9222 - [anthropic]=9223 - [google]=9224 - [deepseek]=9225 - [mistral]=9226 - [poe]=9227 - [perplexity]=9228 - [hf]=9229 -) -LAUNCHED=0 -# Kill orphan chromes first (crashed from previous attempts) -for slug in "${!PROVIDERS[@]}"; do - PORT="${PROVIDERS[$slug]}" - # check if already listening - if ss -tln 2>/dev/null | grep -qE ":${PORT}\\s"; then - echo "[$slug] already UP port $PORT" +# launch-chromes-all v3 - nohup+disown + lock file pour survivre disaster_clean +LOCK=/var/run/wevia-chromes.lock +echo "$(date -Iseconds) PROTECTED" > "$LOCK" 2>/dev/null || sudo bash -c "echo 'PROTECTED' > $LOCK" +declare -A PORTS=([openai]=9222 [anthropic]=9223 [google]=9224 [deepseek]=9225 [mistral]=9226 [poe]=9227 [perplexity]=9228 [hf]=9229) +for SLUG in "${!PORTS[@]}"; do + PORT=${PORTS[$SLUG]} + # skip if already UP + if ss -tln | grep -q ":${PORT} "; then + echo "SKIP ${SLUG} (already :${PORT})" continue fi - # kill any orphan chrome on this profile - pkill -9 -f "user-data-dir=/var/lib/wevia-cyber-profiles/${slug}" 2>/dev/null - sleep 0.2 - PROFILE="/var/lib/wevia-cyber-profiles/${slug}" - nohup google-chrome-stable --no-sandbox --disable-dev-shm-usage \ - --user-data-dir="${PROFILE}" \ - --remote-debugging-port="${PORT}" \ + sudo mkdir -p /var/lib/wevia-cyber-profiles/${SLUG} + sudo chown -R www-data:www-data /var/lib/wevia-cyber-profiles/${SLUG} + sudo -u www-data nohup env DISPLAY=:1 /usr/bin/google-chrome \ + --headless=new --disable-gpu --no-sandbox \ + --remote-debugging-port=${PORT} \ --remote-debugging-address=127.0.0.1 \ - --no-first-run --no-default-browser-check \ - --disable-features=TranslateUI,OptimizationHints \ - > /tmp/chrome-${slug}.log 2>&1 & - disown $! - LAUNCHED=$((LAUNCHED+1)) - echo "[$slug] LAUNCHED pid=$! port=$PORT" + --user-data-dir=/var/lib/wevia-cyber-profiles/${SLUG} \ + --disable-dev-shm-usage --no-first-run --no-default-browser-check \ + > /tmp/chrome-${SLUG}.log 2>&1 & disown + echo "LAUNCH ${SLUG} :${PORT} pid=$!" +done +sleep 8 +echo "=== VERIFY ===" +for SLUG in "${!PORTS[@]}"; do + PORT=${PORTS[$SLUG]} + if ss -tln | grep -q ":${PORT} "; then + echo "✅ ${SLUG} UP :${PORT}" + else + echo "❌ ${SLUG} DOWN :${PORT}" + fi done -echo "=== $LAUNCHED chromes launched ===" -echo "=== wait 6s for CDP to open ===" -sleep 6 -bash /opt/weval-ops/opus-intents/chromes-status.sh