Files
local_yandex_station/start_plugin_web.sh
2026-03-07 22:56:00 +03:00

21 lines
515 B
Bash

#!/usr/bin/env bash
set -euo pipefail
BASE_DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$BASE_DIR"
if [[ ! -d .venv ]]; then
python3 -m venv .venv
fi
# shellcheck disable=SC1091
source .venv/bin/activate
python3 -c "import aiohttp, zeroconf" >/dev/null 2>&1 || {
echo "Missing deps in .venv. Run install.sh"
exit 3
}
WEB_HOST="${ALICE_PLUGIN_WEB_HOST:-0.0.0.0}"
WEB_PORT="${ALICE_PLUGIN_WEB_PORT:-9140}"
exec "$BASE_DIR/.venv/bin/python3" "$BASE_DIR/alice_plugin.py" web --host "$WEB_HOST" --port "$WEB_PORT"