initial-import: 2026-04-11 21:18:55
This commit is contained in:
Executable
+48
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/expect -f
|
||||
|
||||
set timeout 600
|
||||
|
||||
spawn ssh -o StrictHostKeyChecking=no cfdaily@192.168.2.154
|
||||
|
||||
expect {
|
||||
"Password:" {
|
||||
send "Ccf7561523\r"
|
||||
}
|
||||
"password:" {
|
||||
send "Ccf7561523\r"
|
||||
}
|
||||
"Enter passphrase" {
|
||||
send "Ccf7561523\r"
|
||||
}
|
||||
timeout {
|
||||
puts "连接超时"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
expect "$ "
|
||||
|
||||
send "cd /volume1/stock/sanguo_vnpy\r"
|
||||
expect "$ "
|
||||
|
||||
send "ls -la\r"
|
||||
expect "$ "
|
||||
|
||||
send "chmod +x start_on_nas.sh\r"
|
||||
expect "$ "
|
||||
|
||||
send "./start_on_nas.sh\r"
|
||||
|
||||
expect {
|
||||
"✅ sanguo_vnpy 启动成功" {
|
||||
puts "\n\n🎉 部署成功!"
|
||||
}
|
||||
"Docker" {
|
||||
puts "\n\n🚀 Docker 正在部署中,请稍候..."
|
||||
}
|
||||
timeout {
|
||||
puts "\n\n⏳ 命令执行中,部署可能需要5-10分钟..."
|
||||
}
|
||||
}
|
||||
|
||||
interact
|
||||
Reference in New Issue
Block a user