集成 venv 方案: 安装脚本 + 服务文件适配虚拟环境

- install.sh: 创建 .venv、安装 adbutils、生成包装脚本使用 venv python
- padsleep.service: ExecStart 指向 .venv/bin/python3
- requirements.txt: 添加 venv 安装说明
- 解决 PEP 668 (externally-managed-environment) 问题
This commit is contained in:
kushidou
2026-07-10 19:45:50 +08:00
parent 36fe0bb4fd
commit e17d03cea9
3 changed files with 44 additions and 10 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ After=network.target
Type=simple
User=_INSTALL_USER_
WorkingDirectory=/opt/apps/padsleep
ExecStart=/usr/bin/python3 /opt/apps/padsleep/padsleep.py
ExecStart=/opt/apps/padsleep/.venv/bin/python3 /opt/apps/padsleep/padsleep.py
Restart=on-failure
RestartSec=10
StandardOutput=journal