Update server.py
Browse files
server.py
CHANGED
|
@@ -297,7 +297,12 @@ def check_api1():
|
|
| 297 |
print("接口返回信息:", response_json)
|
| 298 |
if "token" in response_json:
|
| 299 |
print("检测到 token")
|
| 300 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 301 |
# break # 跳出循环
|
| 302 |
else:
|
| 303 |
print("接口返回信息:", response_json)
|
|
|
|
| 297 |
print("接口返回信息:", response_json)
|
| 298 |
if "token" in response_json:
|
| 299 |
print("检测到 token")
|
| 300 |
+
try:
|
| 301 |
+
subprocess.run(f"rsync -avz -e 'ssh -p {ssh_port} -o StrictHostKeyChecking=no' root@{frp_url}:/sillytavern/ /sillytavern/", shell=True, check=True)
|
| 302 |
+
except subprocess.CalledProcessError as e:
|
| 303 |
+
print(f"Rsync failed with return code: {e.returncode}")
|
| 304 |
+
print(f"Command output: {e.output}")
|
| 305 |
+
# subprocess.run(f"rsync -avz -e 'ssh -p {ssh_port} -o StrictHostKeyChecking=no' root@{frp_url}:/sillytavern/ /sillytavern/", shell=True, check=True)
|
| 306 |
# break # 跳出循环
|
| 307 |
else:
|
| 308 |
print("接口返回信息:", response_json)
|