some changes in startup

This commit is contained in:
Jon
2026-06-07 20:24:03 +01:00
parent 2d9cb4581a
commit dab2685498

View File

@@ -3,15 +3,20 @@ set -e
cd "$(dirname "$0")"
# Bootstrap virtualenv on first run
if [ ! -d ".venv" ]; then
echo "Creating virtualenv..."
# Bootstrap virtualenv — check for uvicorn specifically so partial installs are retried
if [ ! -f ".venv/bin/uvicorn" ]; then
echo "Setting up virtualenv..."
rm -rf .venv
python3 -m venv .venv
.venv/bin/pip install -q --upgrade pip
.venv/bin/pip install -q -r requirements.txt
.venv/bin/pip install --upgrade pip
.venv/bin/pip install -r requirements.txt
fi
mkdir -p data/bots
mkdir -p data/bots static
# Pre-download the libsimplex native binary so first Start doesn't stall
echo "Checking simplex-chat binary..."
.venv/bin/python -m simplex_chat install 2>/dev/null && echo " simplex binary ready." || echo " Binary not downloaded yet — use the Init button in Settings."
# Set token — override via: MANAGER_TOKEN=mysecret ./start.sh
export MANAGER_TOKEN="${MANAGER_TOKEN:-changeme}"