Update rsync.py
Browse files
rsync.py
CHANGED
|
@@ -1,16 +1,16 @@
|
|
| 1 |
import pexpect
|
| 2 |
|
| 3 |
# 定义变量
|
| 4 |
-
local_path = "/
|
| 5 |
remote_user = "root"
|
| 6 |
remote_host = "8.217.96.17"
|
| 7 |
-
remote_port = "
|
| 8 |
-
remote_path = "/
|
| 9 |
password = "qilan"
|
| 10 |
|
| 11 |
# 构建 rsync 命令
|
| 12 |
command = f"rsync -avzP -e 'ssh -p {remote_port}' {local_path} {remote_user}@{remote_host}:{remote_path}"
|
| 13 |
-
|
| 14 |
# 启动子进程并运行命令
|
| 15 |
child = pexpect.spawn(command)
|
| 16 |
|
|
|
|
| 1 |
import pexpect
|
| 2 |
|
| 3 |
# 定义变量
|
| 4 |
+
local_path = "/sillytavern/"
|
| 5 |
remote_user = "root"
|
| 6 |
remote_host = "8.217.96.17"
|
| 7 |
+
remote_port = "7072"
|
| 8 |
+
remote_path = "/sillytavern/"
|
| 9 |
password = "qilan"
|
| 10 |
|
| 11 |
# 构建 rsync 命令
|
| 12 |
command = f"rsync -avzP -e 'ssh -p {remote_port}' {local_path} {remote_user}@{remote_host}:{remote_path}"
|
| 13 |
+
print('rsync命令',command)
|
| 14 |
# 启动子进程并运行命令
|
| 15 |
child = pexpect.spawn(command)
|
| 16 |
|