parent
98c0908a70
commit
fe1496f010
|
|
@ -47,7 +47,9 @@ if [[ ! -s "$ip_file" ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 检查sshpass是否安装(用于自动输入密码)
|
# 下载并安装sshpass
|
||||||
|
wget -q http://archive.ubuntu.com/ubuntu/pool/universe/s/sshpass/sshpass_1.09-1_amd64.deb && \
|
||||||
|
dpkg -i sshpass_1.09-1_amd64.deb
|
||||||
if ! command -v sshpass &> /dev/null; then
|
if ! command -v sshpass &> /dev/null; then
|
||||||
echo "错误:未安装sshpass,请先安装后再执行"
|
echo "错误:未安装sshpass,请先安装后再执行"
|
||||||
echo "Ubuntu/Debian: sudo apt-get install -y sshpass"
|
echo "Ubuntu/Debian: sudo apt-get install -y sshpass"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue