refactor: 脚本及配置文件命名统一用 _ 分隔
将 .sh/.bat 脚本与 .js/.plist/.Dockerfile 等文件中以 - 分隔的文件名 改为 _ 分隔,dcloud-renew 目录改为 dcloud、script_nuance 目录改为 nuance,并同步更新脚本内部引用与 README 路径。 Co-Authored-By: AtomCode (deepseek-v4-flash) <noreply@atomgit.com>
This commit is contained in:
19
expect_ssh.sh
Executable file
19
expect_ssh.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/expect
|
||||
|
||||
# Usage: expect this.sh [0:hostname] [1:username] [2:pwdadot] [3:pwdroot]
|
||||
|
||||
set timeout 10
|
||||
spawn ssh [lindex $argv 1]@[lindex $argv 0] -p 22
|
||||
expect {
|
||||
"yes/no"
|
||||
{send "yes\n";exp_continue}
|
||||
"password:"
|
||||
{send "[lindex $argv 2]\n";exp_continue}
|
||||
":~"
|
||||
{send "su\n";exp_continue}
|
||||
"Password:"
|
||||
{send "[lindex $argv 3]\ncd /faronear\n"}
|
||||
"密码:"
|
||||
{send "[lindex $argv 3]\ncd /faronear\n"}
|
||||
}
|
||||
interact
|
||||
Reference in New Issue
Block a user