Update server2.py
Browse files- server2.py +2 -1
server2.py
CHANGED
|
@@ -505,8 +505,9 @@ def SillyTavern():
|
|
| 505 |
# 检查文件是否存在
|
| 506 |
if not os.path.exists(f'/{huggingface_Data_name}.zip'):
|
| 507 |
print(f"文件 /{huggingface_Data_name}.zip 不存在,启用实时同步。")
|
|
|
|
| 508 |
generate_ssh_key()
|
| 509 |
-
copy_public_key_to_remote(frp_url, ssh_port, "root", "qilan")
|
| 510 |
subprocess.run(f"rsync -avz -e 'ssh -p {ssh_port} -o StrictHostKeyChecking=no' root@{frp_url}:/sillytavern/ /sillytavern/", shell=True, check=True)
|
| 511 |
# sys.exit()
|
| 512 |
else:
|
|
|
|
| 505 |
# 检查文件是否存在
|
| 506 |
if not os.path.exists(f'/{huggingface_Data_name}.zip'):
|
| 507 |
print(f"文件 /{huggingface_Data_name}.zip 不存在,启用实时同步。")
|
| 508 |
+
os.system(f'ssh-keygen -f "/root/.ssh/known_hosts" -R "[{frp_url}]:{ssh_port}"')
|
| 509 |
generate_ssh_key()
|
| 510 |
+
# copy_public_key_to_remote(frp_url, ssh_port, "root", "qilan")
|
| 511 |
subprocess.run(f"rsync -avz -e 'ssh -p {ssh_port} -o StrictHostKeyChecking=no' root@{frp_url}:/sillytavern/ /sillytavern/", shell=True, check=True)
|
| 512 |
# sys.exit()
|
| 513 |
else:
|