mirror of
https://github.com/thelittlerocket/pve.git
synced 2025-03-07 03:17:20 +08:00
Update install_pve.sh
This commit is contained in:
parent
d28cf06b41
commit
8b41a0da60
1 changed files with 9 additions and 0 deletions
|
@ -233,6 +233,15 @@ then
|
|||
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null
|
||||
chattr +i /etc/resolv.conf
|
||||
fi
|
||||
if [ $? -ne 0 ]; then
|
||||
if [ ! -f /etc/rc.local ]; then
|
||||
echo "#!/bin/bash" | sudo tee /etc/rc.local > /dev/null
|
||||
echo "echo \"nameserver 8.8.8.8\" > /etc/resolv.conf" | sudo tee -a /etc/rc.local > /dev/null
|
||||
sudo chmod +x /etc/rc.local
|
||||
fi
|
||||
fi
|
||||
systemctl enable rc-local.service
|
||||
systemctl start rc-local.service
|
||||
# 打印安装后的信息
|
||||
url="https://${ip}:8006/"
|
||||
_green "安装完毕,请打开HTTPS网页 $url"
|
||||
|
|
Loading…
Reference in a new issue