some changes in startup
This commit is contained in:
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user