release
This commit is contained in:
20
start_plugin_web.sh
Normal file
20
start_plugin_web.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/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"
|
||||
Reference in New Issue
Block a user