集成 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:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user