2a37a4ffbf
Equivalentes .command (doble-clic en Finder) de los .bat de Windows: - setup_mac.command: bootstrap con un click (detecta Python 3.10+, crea .venv, instala requirements + Chromium de Playwright, copia .env.example -> .env). - start/stop/restart/start_persistent_profile.command: espejo de los .bat, lanzan el server con nohup usando el python del .venv. - mp_common.sh: helper compartido (raíz, venv, banners). runtime_control.py ahora es cross-platform (IS_WINDOWS): lsof/ps/pgrep/kill en POSIX, netstat/PowerShell/taskkill en Windows. _kill_tree_posix mata el árbol padre+worker de uvicorn con SIGTERM. .venv/ añadido a .gitignore. Docs actualizadas (CLAUDE.md, AGENTS.md, PLAYWRIGHT_SESSION.md). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
24 lines
770 B
Bash
Executable File
24 lines
770 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# ---------------------------------------------------------------------------
|
|
# stop.command — Equivalente macOS/Linux de stop.bat.
|
|
# Delega TODO a runtime_control.py para garantizar que solo se detiene MP
|
|
# Manager (nunca otro proyecto Python que escuche en el puerto 8000).
|
|
#
|
|
# Acepta los mismos flags que el .bat, p.ej.:
|
|
# ./stop.command --force (apaga también instancias huérfanas sin server_info)
|
|
# ---------------------------------------------------------------------------
|
|
set -euo pipefail
|
|
source "$(dirname "${BASH_SOURCE[0]}")/mp_common.sh"
|
|
|
|
banner "MP Manager - Deteniendo Servidor Monte Providencia"
|
|
|
|
PY="$(require_venv)" || { hold_window; exit 1; }
|
|
|
|
set +e
|
|
"$PY" runtime_control.py stop "$@"
|
|
RC=$?
|
|
set -e
|
|
|
|
hold_window
|
|
exit "$RC"
|