This commit is contained in:
eric
2026-04-05 01:00:07 -05:00
parent b94c00fe56
commit 4bd5a33d3a
2607 changed files with 137903 additions and 92 deletions

15
_gps_ssh_auth.py Normal file
View File

@@ -0,0 +1,15 @@
"""SSH 密码:环境变量 FL_SSH_PASS否则读 gps 目录下 fl_ssh_pass.txt / .fl_ssh_pass单行"""
import os
def ssh_password(gps_root: str) -> str:
p = os.environ.get("FL_SSH_PASS", "").strip()
if p:
return p
for name in ("fl_ssh_pass.txt", ".fl_ssh_pass"):
path = os.path.join(gps_root, name)
if os.path.isfile(path):
with open(path, encoding="utf-8", errors="replace") as f:
return f.read().strip()
return ""