Update install_pve7.sh

This commit is contained in:
spiritLHLS 2023-02-13 19:26:28 +08:00 committed by GitHub
parent bb59e7fa1b
commit 390397e69f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,7 +32,7 @@ fi
# 修改 /etc/hosts
ip=$(curl -s ipv4.ip.sb)
line_number=$(tac /etc/hosts | grep -n "^127\.0\.0\.1" | head -n 1 | awk -F: '{print $1}')
echo "$ip pve.proxmox.com pve" | tee -a /etc/hosts > /dev/null
# echo "$ip pve.proxmox.com pve" | tee -a /etc/hosts > /dev/null
sed -i "${line_number} a $ip pve.proxmox.com pve" /etc/hosts
# 新增pve源