Update install_pve7.sh

This commit is contained in:
spiritLHLS 2023-02-13 19:50:44 +08:00 committed by GitHub
parent b3d6b189d7
commit 62dc920c52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,17 +14,6 @@ if ! command -v curl > /dev/null 2>&1; then
apt-get install -y curl apt-get install -y curl
fi 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 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
ip_type=$(curl -s ip.sb | grep -oP '(?<=is )(.+)(?=\.)')
if [ -z "$ip_type" ]; then
echo "Error: curl request failed"
exit 1
fi
if [ "$ip_type" != "IPv4" ]; then
priority=$(grep precedence /etc/gai.conf | grep -oP '(?<=precedence ::/0 )\d+')
fi
if [ "$ip_type" = "IPv6" ] && [ "$priority" -lt "100" ]; then
echo "precedence ::/0 100" > /etc/gai.conf
fi
sysctl -w net.ipv6.conf.all.disable_ipv6=1 sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1 sysctl -w net.ipv6.conf.default.disable_ipv6=1
apt-get install gnupg -y apt-get install gnupg -y