Files
sanguo_vnpy/archive/2026-04-29-cleanup/scripts/utils/check_nas_services.exp
T
2026-04-29 20:15:43 +08:00

37 lines
601 B
Plaintext
Executable File

#!/usr/bin/expect -f
set timeout 30
set nas_ip "192.168.2.154"
set nas_user "cfdaily"
set nas_pass "Ccf7561523"
spawn ssh $nas_user@$nas_ip
expect {
"Password:" {
send "$nas_pass\r"
}
"password:" {
send "$nas_pass\r"
}
"Are you sure you want to continue connecting" {
send "yes\r"
exp_continue
}
timeout {
puts "SSH连接超时"
exit 1
}
}
expect "$ "
send "cd /volume1/stock/sanguo_vnpy && ls -la scripts/\r"
expect "$ "
send "cd /volume1/stock/sanguo_vnpy && docker ps -a\r"
expect "$ "
send "exit\r"
expect eof