From b8b4be9abb73e5ab166f1b7f2e6cf5614ffaec6d Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Sat, 16 Sep 2023 21:45:37 +0800 Subject: [PATCH] Update install_pve.sh --- scripts/install_pve.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install_pve.sh b/scripts/install_pve.sh index 96650fb..fa544b1 100644 --- a/scripts/install_pve.sh +++ b/scripts/install_pve.sh @@ -677,7 +677,7 @@ cdn_urls=("https://cdn.spiritlhl.workers.dev/" "https://cdn3.spiritlhl.net/" "ht check_cdn_file systemctl restart networking -if [ $? -ne 0 ]; then +if [ $? -ne 0 ] && [ -e "/etc/systemd/system/networking.service" ]; then # altname=$(ip addr show eth0 | grep altname | awk '{print $NF}') if [ -f /etc/network/interfaces ] && grep -q "eth0" /etc/network/interfaces; then chattr -i /etc/network/interfaces @@ -688,7 +688,7 @@ if [ $? -ne 0 ]; then fi fi systemctl restart networking -if [ $? -ne 0 ]; then +if [ $? -ne 0 ] && [ -e "/etc/systemd/system/networking.service" ]; then if [ ! -f "/usr/local/bin/clear_interface_route_cache.sh" ]; then wget ${cdn_success_url}https://raw.githubusercontent.com/spiritLHLS/pve/main/extra_scripts/clear_interface_route_cache.sh -O /usr/local/bin/clear_interface_route_cache.sh wget ${cdn_success_url}https://raw.githubusercontent.com/spiritLHLS/pve/main/extra_scripts/clear_interface_route_cache.service -O /etc/systemd/system/clear_interface_route_cache.service