This commit is contained in:
陆柯 2021-11-05 21:53:04 +08:00
parent fed07bf3f8
commit 8a0c0d9e1f
2 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@
set timeout 30 set timeout 30
spawn ssh [lindex $argv 1]@[lindex $argv 0] -p 22 spawn ssh [lindex $argv 1]@[lindex $argv 0] -p 22
expect { expect {
"(yes/no)?" "yes/no"
{send "yes\n";exp_continue} {send "yes\n";exp_continue}
"password:" "password:"
{send "[lindex $argv 2]\n";exp_continue} {send "[lindex $argv 2]\n";exp_continue}
@ -13,7 +13,7 @@ expect {
{send "su\n";exp_continue} {send "su\n";exp_continue}
"Password:" "Password:"
{send "[lindex $argv 3]\ncd /faronear\n"} {send "[lindex $argv 3]\ncd /faronear\n"}
# "密码:" "密码:"
# {send "[lindex $argv 3]\ncd /faronear\n"} {send "[lindex $argv 3]\ncd /faronear\n"}
} }
interact interact

View File

@ -22,10 +22,10 @@ then
else else
sudo apt update sudo apt update
echo "######## Installing C++ build tools for Linux ########" echo "######## Installing C++ build tools for Linux ########"
sudo apt install curl gcc g++ make -y sudo apt install curl gcc g++ make python -y # Debian 11 has no python by default.
echo "######## Installing nodejs v$nodeVersion ########" echo "######## Installing nodejs v$nodeVersion ########"
echo From https://deb.nodesource.com/setup_$nodeVersion.x echo From https://deb.nodesource.com/setup_$nodeVersion.x
curl -sL https://deb.nodesource.com/setup_$nodeVersion.x | sudo bash - && sudo apt install nodejs -y curl -sL https://deb.nodesource.com/setup_$nodeVersion.x | sudo bash - && sudo apt install nodejs -y
echo "######## nodejs v$nodeVersion installed completely! ##################" echo "######## nodejs v$nodeVersion installed completely! ########"
fi fi