From abf962852a84cd7def488c4b8435fb5804058105 Mon Sep 17 00:00:00 2001 From: spiritLHLS <103393591+spiritLHLS@users.noreply.github.com> Date: Tue, 4 Apr 2023 19:12:24 +0800 Subject: [PATCH] Update install_pve.sh --- install_pve.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install_pve.sh b/install_pve.sh index ec976e5..22bccc7 100644 --- a/install_pve.sh +++ b/install_pve.sh @@ -225,6 +225,11 @@ if grep -q "source /etc/network/interfaces.d/*" /etc/network/interfaces; then fi fi systemctl restart networking +if [ ! -s "/etc/resolv.conf" ] +then + echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null + sudo chattr +i /etc/resolv.conf +fi # 打印安装后的信息 url="https://${ip}:8006/" _green "安装完毕,请打开HTTPS网页 $url"