Merge branch 'main-upstream'

This commit is contained in:
Sam Heinz
2024-07-01 12:31:43 +10:00
13 changed files with 48 additions and 56 deletions

View File

@@ -95,16 +95,13 @@ root_check() {
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
pve_check() {
if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Proxmox VE 7 Detected" "You are currently using Proxmox VE 7 (EOL 2024-07), refrain from creating Debian 12 LXCs. \nDefault distribution for $APP LXC is ${var_os} ${var_version}" 10 60
fi
if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then
if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then
msg_error "This version of Proxmox Virtual Environment is not supported"
echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later."
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
echo -e "Exiting..."
sleep 2
exit
fi
fi
}
# This function checks if the script is running through SSH and prompts the user to confirm if they want to proceed or exit.
@@ -617,10 +614,10 @@ EOF
if [ "$var_os" == "alpine" ]; then
sleep 3
pct exec "$CTID" -- /bin/sh -c 'cat <<EOF >/etc/apk/repositories
#http://dl-cdn.alpinelinux.org/alpine/latest-stable/main
#http://dl-cdn.alpinelinux.org/alpine/latest-stable/community
http://dl-cdn.alpinelinux.org/alpine/v3.20/main
http://dl-cdn.alpinelinux.org/alpine/v3.20/community
http://dl-cdn.alpinelinux.org/alpine/latest-stable/main
http://dl-cdn.alpinelinux.org/alpine/latest-stable/community
#http://dl-cdn.alpinelinux.org/alpine/v3.19/main
#http://dl-cdn.alpinelinux.org/alpine/v3.19/community
EOF'
pct exec "$CTID" -- ash -c "apk add bash >/dev/null"
fi