fix:优化服务
This commit is contained in:
23
video_worker/scripts/one_click_wsl.sh
Normal file
23
video_worker/scripts/one_click_wsl.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
cd "$ROOT_DIR"
|
||||
|
||||
if ! command -v python3 >/dev/null 2>&1; then
|
||||
echo "[ERROR] python3 not found in WSL environment"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d .venv ]; then
|
||||
echo "[INFO] .venv not found, running install_wsl_env.sh"
|
||||
bash scripts/install_wsl_env.sh
|
||||
fi
|
||||
|
||||
if [ ! -f .env ]; then
|
||||
echo "[INFO] .env not found, copying from .env.example"
|
||||
cp .env.example .env
|
||||
fi
|
||||
|
||||
echo "[INFO] launching server in WSL"
|
||||
exec bash scripts/run_server.sh
|
||||
Reference in New Issue
Block a user