mirror of
https://github.com/thelittlerocket/pve.git
synced 2024-12-25 08:11:16 +08:00
Update install_pve7.sh
This commit is contained in:
parent
02ec1a66b1
commit
08ea1f315b
1 changed files with 4 additions and 6 deletions
|
@ -16,6 +16,10 @@ fi
|
|||
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/check_sudo.sh -o check_sudo.sh && chmod +x check_sudo.sh && bash check_sudo.sh > /dev/null 2>&1
|
||||
# sysctl -w net.ipv6.conf.all.disable_ipv6=1
|
||||
# sysctl -w net.ipv6.conf.default.disable_ipv6=1
|
||||
# 修改 /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}')
|
||||
sed -i "${line_number} a $ip pve.proxmox.com pve" /etc/hosts
|
||||
sed -i '/127.0.0.1 localhost/d' /etc/hosts
|
||||
hostname=$(cat /etc/hostname)
|
||||
ip_address=$(hostname -i)
|
||||
|
@ -34,12 +38,6 @@ else
|
|||
echo "The system meets the minimum requirements for Proxmox VE installation."
|
||||
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
|
||||
sed -i "${line_number} a $ip pve.proxmox.com pve" /etc/hosts
|
||||
|
||||
# 新增pve源
|
||||
version=$(lsb_release -cs)
|
||||
if [ "$version" == "jessie" ]; then
|
||||
|
|
Loading…
Reference in a new issue