From 7b41d801dfa9c9a137f67ab3f49f03bbfc09e1d6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 11 Feb 2023 19:40:15 -0500 Subject: [PATCH] update ARCH_CHECK & PVE_CHECK --- ct/adguard-v5.sh | 20 ++++++++++---------- ct/alpine-v5.sh | 20 ++++++++++---------- ct/archlinux-v5.sh | 20 ++++++++++---------- ct/audiobookshelf-v5.sh | 20 ++++++++++---------- ct/autobrr-v5.sh | 20 ++++++++++---------- ct/blocky-v5.sh | 20 ++++++++++---------- ct/casaos-v5.sh | 20 ++++++++++---------- ct/changedetection-v5.sh | 20 ++++++++++---------- ct/cronicle-v5.sh | 20 ++++++++++---------- ct/daemonsync-v5.sh | 20 ++++++++++---------- ct/dashy-v5.sh | 20 ++++++++++---------- ct/debian-v5.sh | 20 ++++++++++---------- ct/deconz-v5.sh | 20 ++++++++++---------- ct/deluge-v5.sh | 20 ++++++++++---------- ct/devuan-v5.sh | 20 ++++++++++---------- ct/docker-v5.sh | 20 ++++++++++---------- ct/emby-v5.sh | 20 ++++++++++---------- ct/emqx-v5.sh | 20 ++++++++++---------- ct/esphome-v5.sh | 20 ++++++++++---------- ct/grafana-v5.sh | 20 ++++++++++---------- ct/grocy-v5.sh | 20 ++++++++++---------- ct/heimdalldashboard-v5.sh | 20 ++++++++++---------- ct/homeassistant-core-v5.sh | 22 +++++++++++----------- ct/homeassistant-v5.sh | 20 ++++++++++---------- ct/homebridge-v5.sh | 20 ++++++++++---------- ct/homepage-v5.sh | 20 ++++++++++---------- ct/homer-v5.sh | 20 ++++++++++---------- ct/hyperion-v5.sh | 20 ++++++++++---------- ct/influxdb-v5.sh | 20 ++++++++++---------- ct/iobroker-v5.sh | 20 ++++++++++---------- ct/jellyfin-v5.sh | 20 ++++++++++---------- ct/k0s-v5.sh | 20 ++++++++++---------- ct/kavita-v5.sh | 20 ++++++++++---------- ct/keycloak-v5.sh | 20 ++++++++++---------- ct/lidarr-v5.sh | 20 ++++++++++---------- ct/magicmirror-v5.sh | 20 ++++++++++---------- ct/mariadb-v5.sh | 20 ++++++++++---------- ct/meshcentral-v5.sh | 20 ++++++++++---------- ct/motioneye-v5.sh | 20 ++++++++++---------- ct/mqtt-v5.sh | 20 ++++++++++---------- ct/n8n-v5.sh | 20 ++++++++++---------- ct/navidrome-v5.sh | 20 ++++++++++---------- ct/nextcloudpi-v5.sh | 20 ++++++++++---------- ct/nginxproxymanager-v5.sh | 20 ++++++++++---------- ct/nocodb-v5.sh | 20 ++++++++++---------- ct/node-red-v5.sh | 20 ++++++++++---------- ct/omada-v5.sh | 20 ++++++++++---------- ct/omv-v5.sh | 20 ++++++++++---------- ct/openhab-v5.sh | 20 ++++++++++---------- ct/paperless-ngx-v5.sh | 20 ++++++++++---------- ct/photoprism-v5.sh | 20 ++++++++++---------- ct/pihole-v5.sh | 20 ++++++++++---------- ct/plex-v5.sh | 20 ++++++++++---------- ct/podman-homeassistant-v5.sh | 20 ++++++++++---------- ct/podman-v5.sh | 20 ++++++++++---------- ct/postgresql-v5.sh | 20 ++++++++++---------- ct/prometheus-v5.sh | 20 ++++++++++---------- ct/prowlarr-v5.sh | 20 ++++++++++---------- ct/radarr-v5.sh | 20 ++++++++++---------- ct/readarr-v5.sh | 20 ++++++++++---------- ct/rockylinux-v5.sh | 20 ++++++++++---------- ct/sabnzbd-v5.sh | 20 ++++++++++---------- ct/scrypted-v5.sh | 20 ++++++++++---------- ct/shinobi-v5.sh | 20 ++++++++++---------- ct/sonarr-v5.sh | 20 ++++++++++---------- ct/syncthing-v5.sh | 20 ++++++++++---------- ct/tdarr-v5.sh | 20 ++++++++++---------- ct/technitiumdns-v5.sh | 20 ++++++++++---------- ct/transmission-v5.sh | 20 ++++++++++---------- ct/trilium-v5.sh | 20 ++++++++++---------- ct/ubuntu-v5.sh | 20 ++++++++++---------- ct/umbrel-v5.sh | 20 ++++++++++---------- ct/unifi-v5.sh | 20 ++++++++++---------- ct/uptimekuma-v5.sh | 20 ++++++++++---------- ct/vaultwarden-v5.sh | 20 ++++++++++---------- ct/whisparr-v5.sh | 20 ++++++++++---------- ct/whoogle-v5.sh | 20 ++++++++++---------- ct/wikijs-v5.sh | 20 ++++++++++---------- ct/wireguard-v5.sh | 20 ++++++++++---------- ct/yunohost-v5.sh | 20 ++++++++++---------- ct/zigbee2mqtt-v5.sh | 20 ++++++++++---------- ct/zwave-js-ui-v5.sh | 20 ++++++++++---------- 82 files changed, 821 insertions(+), 821 deletions(-) diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index 2022e1f7..b6bb6a83 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -65,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -366,6 +365,7 @@ exit clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/alpine-v5.sh b/ct/alpine-v5.sh index f48475c6..603603ce 100644 --- a/ct/alpine-v5.sh +++ b/ct/alpine-v5.sh @@ -65,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -345,6 +344,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/archlinux-v5.sh b/ct/archlinux-v5.sh index 5349d521..f2c85dbf 100644 --- a/ct/archlinux-v5.sh +++ b/ct/archlinux-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -349,6 +348,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/audiobookshelf-v5.sh b/ct/audiobookshelf-v5.sh index 981f227d..ded8780e 100644 --- a/ct/audiobookshelf-v5.sh +++ b/ct/audiobookshelf-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -344,6 +343,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/autobrr-v5.sh b/ct/autobrr-v5.sh index e5fdb60f..c82e6acf 100644 --- a/ct/autobrr-v5.sh +++ b/ct/autobrr-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -358,6 +357,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/blocky-v5.sh b/ct/blocky-v5.sh index ccf94f66..53024f22 100644 --- a/ct/blocky-v5.sh +++ b/ct/blocky-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -349,6 +348,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/casaos-v5.sh b/ct/casaos-v5.sh index 416743d9..15444b28 100644 --- a/ct/casaos-v5.sh +++ b/ct/casaos-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -358,6 +357,7 @@ exit clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$FUSE" == "yes" ]; then diff --git a/ct/changedetection-v5.sh b/ct/changedetection-v5.sh index 7ef66909..52f23369 100644 --- a/ct/changedetection-v5.sh +++ b/ct/changedetection-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -348,6 +347,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/cronicle-v5.sh b/ct/cronicle-v5.sh index a8ce108b..e5055db8 100644 --- a/ct/cronicle-v5.sh +++ b/ct/cronicle-v5.sh @@ -65,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -395,6 +394,7 @@ fi clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/daemonsync-v5.sh b/ct/daemonsync-v5.sh index 49e06d6c..223e7411 100644 --- a/ct/daemonsync-v5.sh +++ b/ct/daemonsync-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -349,6 +348,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/dashy-v5.sh b/ct/dashy-v5.sh index 7f51ba45..d6c83f28 100644 --- a/ct/dashy-v5.sh +++ b/ct/dashy-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -375,6 +374,7 @@ exit clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/debian-v5.sh b/ct/debian-v5.sh index 02e30838..b5fd65e3 100644 --- a/ct/debian-v5.sh +++ b/ct/debian-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -344,6 +343,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/deconz-v5.sh b/ct/deconz-v5.sh index f26890fb..71143104 100644 --- a/ct/deconz-v5.sh +++ b/ct/deconz-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -350,6 +349,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/deluge-v5.sh b/ct/deluge-v5.sh index e69cd92a..abc85a95 100644 --- a/ct/deluge-v5.sh +++ b/ct/deluge-v5.sh @@ -65,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -345,6 +344,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/devuan-v5.sh b/ct/devuan-v5.sh index fe55f367..68332ab9 100644 --- a/ct/devuan-v5.sh +++ b/ct/devuan-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -344,6 +343,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/docker-v5.sh b/ct/docker-v5.sh index 25b390a2..5473e149 100644 --- a/ct/docker-v5.sh +++ b/ct/docker-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -355,6 +354,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$FUSE" == "yes" ]; then diff --git a/ct/emby-v5.sh b/ct/emby-v5.sh index 6d9d2fac..0ebabf8b 100644 --- a/ct/emby-v5.sh +++ b/ct/emby-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -368,6 +367,7 @@ exit clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/emqx-v5.sh b/ct/emqx-v5.sh index 3ea8ff96..1eee19c3 100644 --- a/ct/emqx-v5.sh +++ b/ct/emqx-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -348,6 +347,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/esphome-v5.sh b/ct/esphome-v5.sh index fb44c748..767b2e1e 100644 --- a/ct/esphome-v5.sh +++ b/ct/esphome-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -355,6 +354,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/grafana-v5.sh b/ct/grafana-v5.sh index 6ac359a5..9dc57e0e 100644 --- a/ct/grafana-v5.sh +++ b/ct/grafana-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -349,6 +348,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/grocy-v5.sh b/ct/grocy-v5.sh index c1bb4dbd..7e754501 100644 --- a/ct/grocy-v5.sh +++ b/ct/grocy-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -348,6 +347,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/heimdalldashboard-v5.sh b/ct/heimdalldashboard-v5.sh index 8d890a1f..c66dc6ad 100644 --- a/ct/heimdalldashboard-v5.sh +++ b/ct/heimdalldashboard-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -428,6 +427,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index f7c432c5..66032356 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -66,23 +66,22 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - msg_error "This script requires Proxmox Virtual Environment 7.0 or greater" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit fi - } +} if command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then NEXTID=$(pvesh get /cluster/nextid) @@ -423,6 +422,7 @@ fi clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index df6808f6..9c37a5d9 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -65,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -423,6 +422,7 @@ fi clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$FUSE" == "yes" ]; then diff --git a/ct/homebridge-v5.sh b/ct/homebridge-v5.sh index 5442b1b1..1e7ade6b 100644 --- a/ct/homebridge-v5.sh +++ b/ct/homebridge-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -349,6 +348,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/homepage-v5.sh b/ct/homepage-v5.sh index 620dee04..946f6725 100644 --- a/ct/homepage-v5.sh +++ b/ct/homepage-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -355,6 +354,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/homer-v5.sh b/ct/homer-v5.sh index f9b75c3d..7b6d4763 100644 --- a/ct/homer-v5.sh +++ b/ct/homer-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -368,6 +367,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/hyperion-v5.sh b/ct/hyperion-v5.sh index 81e30620..7ecc5796 100644 --- a/ct/hyperion-v5.sh +++ b/ct/hyperion-v5.sh @@ -65,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -350,6 +349,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/influxdb-v5.sh b/ct/influxdb-v5.sh index eaf8ada3..dc22c208 100644 --- a/ct/influxdb-v5.sh +++ b/ct/influxdb-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -349,6 +348,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/iobroker-v5.sh b/ct/iobroker-v5.sh index 55e1d493..99e4f4a9 100644 --- a/ct/iobroker-v5.sh +++ b/ct/iobroker-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -349,6 +348,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/jellyfin-v5.sh b/ct/jellyfin-v5.sh index e5b677be..40bc14fc 100644 --- a/ct/jellyfin-v5.sh +++ b/ct/jellyfin-v5.sh @@ -65,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -358,6 +357,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/k0s-v5.sh b/ct/k0s-v5.sh index 04c0e1f1..43c54c37 100644 --- a/ct/k0s-v5.sh +++ b/ct/k0s-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -349,6 +348,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/kavita-v5.sh b/ct/kavita-v5.sh index c5338e4d..ceb59f60 100644 --- a/ct/kavita-v5.sh +++ b/ct/kavita-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -347,6 +346,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/keycloak-v5.sh b/ct/keycloak-v5.sh index e4a3aad0..56c2abc4 100644 --- a/ct/keycloak-v5.sh +++ b/ct/keycloak-v5.sh @@ -65,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -350,6 +349,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/lidarr-v5.sh b/ct/lidarr-v5.sh index 931ca190..dee7373e 100644 --- a/ct/lidarr-v5.sh +++ b/ct/lidarr-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -344,6 +343,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/magicmirror-v5.sh b/ct/magicmirror-v5.sh index 5862a8e6..c9f1dc34 100644 --- a/ct/magicmirror-v5.sh +++ b/ct/magicmirror-v5.sh @@ -65,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -351,6 +350,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/mariadb-v5.sh b/ct/mariadb-v5.sh index 6ea66777..b5a23a92 100644 --- a/ct/mariadb-v5.sh +++ b/ct/mariadb-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -349,6 +348,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/meshcentral-v5.sh b/ct/meshcentral-v5.sh index 79609b9d..9da595e7 100644 --- a/ct/meshcentral-v5.sh +++ b/ct/meshcentral-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -349,6 +348,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/motioneye-v5.sh b/ct/motioneye-v5.sh index f50a8cf5..452c18b1 100644 --- a/ct/motioneye-v5.sh +++ b/ct/motioneye-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -348,6 +347,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/mqtt-v5.sh b/ct/mqtt-v5.sh index f5de113d..3220ebcc 100644 --- a/ct/mqtt-v5.sh +++ b/ct/mqtt-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -349,6 +348,7 @@ exit clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/n8n-v5.sh b/ct/n8n-v5.sh index 2132cdd1..f4ff0e1c 100644 --- a/ct/n8n-v5.sh +++ b/ct/n8n-v5.sh @@ -65,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -349,6 +348,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/navidrome-v5.sh b/ct/navidrome-v5.sh index 2999950c..60512a0d 100644 --- a/ct/navidrome-v5.sh +++ b/ct/navidrome-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -360,6 +359,7 @@ exit clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/nextcloudpi-v5.sh b/ct/nextcloudpi-v5.sh index a8b21172..5d95861a 100644 --- a/ct/nextcloudpi-v5.sh +++ b/ct/nextcloudpi-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -349,6 +348,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh index 94a17159..7fd7b5ba 100644 --- a/ct/nginxproxymanager-v5.sh +++ b/ct/nginxproxymanager-v5.sh @@ -65,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -458,6 +457,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/nocodb-v5.sh b/ct/nocodb-v5.sh index c9e31080..5b15a37d 100644 --- a/ct/nocodb-v5.sh +++ b/ct/nocodb-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -352,6 +351,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/node-red-v5.sh b/ct/node-red-v5.sh index e4016d4d..95769429 100644 --- a/ct/node-red-v5.sh +++ b/ct/node-red-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -385,6 +384,7 @@ fi clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/omada-v5.sh b/ct/omada-v5.sh index 0160d8f5..c0ea7c0c 100644 --- a/ct/omada-v5.sh +++ b/ct/omada-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -347,6 +346,7 @@ function install_script() { } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/omv-v5.sh b/ct/omv-v5.sh index cda88be9..adf7f2e4 100644 --- a/ct/omv-v5.sh +++ b/ct/omv-v5.sh @@ -65,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -350,6 +349,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/openhab-v5.sh b/ct/openhab-v5.sh index c183799f..281f64e4 100644 --- a/ct/openhab-v5.sh +++ b/ct/openhab-v5.sh @@ -65,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -350,6 +349,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh index 4e8ff9c3..b7eb28ab 100644 --- a/ct/paperless-ngx-v5.sh +++ b/ct/paperless-ngx-v5.sh @@ -65,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -417,6 +416,7 @@ fi clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/photoprism-v5.sh b/ct/photoprism-v5.sh index 886008c8..2cee6ad5 100644 --- a/ct/photoprism-v5.sh +++ b/ct/photoprism-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -370,6 +369,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/pihole-v5.sh b/ct/pihole-v5.sh index 03fa249b..7cfa5a5b 100644 --- a/ct/pihole-v5.sh +++ b/ct/pihole-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -349,6 +348,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/plex-v5.sh b/ct/plex-v5.sh index 25555eab..56d28179 100644 --- a/ct/plex-v5.sh +++ b/ct/plex-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -368,6 +367,7 @@ fi } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/podman-homeassistant-v5.sh b/ct/podman-homeassistant-v5.sh index b1581dff..05ae7e6d 100644 --- a/ct/podman-homeassistant-v5.sh +++ b/ct/podman-homeassistant-v5.sh @@ -68,18 +68,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -400,6 +399,7 @@ fi clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/podman-v5.sh b/ct/podman-v5.sh index 75b3170c..e0b7bd6d 100644 --- a/ct/podman-v5.sh +++ b/ct/podman-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -349,6 +348,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/postgresql-v5.sh b/ct/postgresql-v5.sh index f6c599f6..69519af2 100644 --- a/ct/postgresql-v5.sh +++ b/ct/postgresql-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -349,6 +348,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/prometheus-v5.sh b/ct/prometheus-v5.sh index 3f61b2c8..ab41eda5 100644 --- a/ct/prometheus-v5.sh +++ b/ct/prometheus-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -349,6 +348,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/prowlarr-v5.sh b/ct/prowlarr-v5.sh index 5a6e998d..b399e15a 100644 --- a/ct/prowlarr-v5.sh +++ b/ct/prowlarr-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -344,6 +343,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/radarr-v5.sh b/ct/radarr-v5.sh index 20ed874d..a2905d5a 100644 --- a/ct/radarr-v5.sh +++ b/ct/radarr-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -344,6 +343,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/readarr-v5.sh b/ct/readarr-v5.sh index 0dffef6a..c658e402 100644 --- a/ct/readarr-v5.sh +++ b/ct/readarr-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -344,6 +343,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/rockylinux-v5.sh b/ct/rockylinux-v5.sh index f548f14b..02744868 100644 --- a/ct/rockylinux-v5.sh +++ b/ct/rockylinux-v5.sh @@ -65,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -350,6 +349,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/sabnzbd-v5.sh b/ct/sabnzbd-v5.sh index 40bffdbf..befe2355 100644 --- a/ct/sabnzbd-v5.sh +++ b/ct/sabnzbd-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -344,6 +343,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/scrypted-v5.sh b/ct/scrypted-v5.sh index cc759881..9d5f524b 100644 --- a/ct/scrypted-v5.sh +++ b/ct/scrypted-v5.sh @@ -65,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -350,6 +349,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/shinobi-v5.sh b/ct/shinobi-v5.sh index cad79e5c..7fdda321 100644 --- a/ct/shinobi-v5.sh +++ b/ct/shinobi-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -359,6 +358,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/sonarr-v5.sh b/ct/sonarr-v5.sh index 7ca8a5d7..30c4c41c 100644 --- a/ct/sonarr-v5.sh +++ b/ct/sonarr-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -344,6 +343,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/syncthing-v5.sh b/ct/syncthing-v5.sh index 2c1c13d1..ff71e504 100644 --- a/ct/syncthing-v5.sh +++ b/ct/syncthing-v5.sh @@ -65,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -350,6 +349,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/tdarr-v5.sh b/ct/tdarr-v5.sh index 3319a7e3..690b2636 100644 --- a/ct/tdarr-v5.sh +++ b/ct/tdarr-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -344,6 +343,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/technitiumdns-v5.sh b/ct/technitiumdns-v5.sh index 729a6c3b..3072a3cb 100644 --- a/ct/technitiumdns-v5.sh +++ b/ct/technitiumdns-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -411,6 +410,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/transmission-v5.sh b/ct/transmission-v5.sh index f99e4644..13ea3856 100644 --- a/ct/transmission-v5.sh +++ b/ct/transmission-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -344,6 +343,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/trilium-v5.sh b/ct/trilium-v5.sh index e6b8b540..58673f5b 100644 --- a/ct/trilium-v5.sh +++ b/ct/trilium-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -368,6 +367,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/ubuntu-v5.sh b/ct/ubuntu-v5.sh index 3416113c..7fa69b20 100644 --- a/ct/ubuntu-v5.sh +++ b/ct/ubuntu-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -352,6 +351,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/umbrel-v5.sh b/ct/umbrel-v5.sh index 24c40e7e..4f9e73c4 100644 --- a/ct/umbrel-v5.sh +++ b/ct/umbrel-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -356,6 +355,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$FUSE" == "yes" ]; then diff --git a/ct/unifi-v5.sh b/ct/unifi-v5.sh index 78b76c0c..511450db 100644 --- a/ct/unifi-v5.sh +++ b/ct/unifi-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -349,6 +348,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/uptimekuma-v5.sh b/ct/uptimekuma-v5.sh index 2af3e44c..507222a3 100644 --- a/ct/uptimekuma-v5.sh +++ b/ct/uptimekuma-v5.sh @@ -65,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -366,6 +365,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index 6165882d..0c31ac50 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -417,6 +416,7 @@ fi clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/whisparr-v5.sh b/ct/whisparr-v5.sh index 87043a9b..d9b87bd9 100644 --- a/ct/whisparr-v5.sh +++ b/ct/whisparr-v5.sh @@ -65,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -345,6 +344,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/whoogle-v5.sh b/ct/whoogle-v5.sh index d3c6b07c..d8ff114d 100644 --- a/ct/whoogle-v5.sh +++ b/ct/whoogle-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -348,6 +347,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/wikijs-v5.sh b/ct/wikijs-v5.sh index 5e4ecb02..69668efd 100644 --- a/ct/wikijs-v5.sh +++ b/ct/wikijs-v5.sh @@ -65,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -362,6 +361,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index ea6c3d1a..0ac8c3a6 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -404,6 +403,7 @@ fi clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/yunohost-v5.sh b/ct/yunohost-v5.sh index cabde660..1af90dfc 100644 --- a/ct/yunohost-v5.sh +++ b/ct/yunohost-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -344,6 +343,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/zigbee2mqtt-v5.sh b/ct/zigbee2mqtt-v5.sh index 42767d5d..445461f3 100644 --- a/ct/zigbee2mqtt-v5.sh +++ b/ct/zigbee2mqtt-v5.sh @@ -65,18 +65,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -395,6 +394,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then diff --git a/ct/zwave-js-ui-v5.sh b/ct/zwave-js-ui-v5.sh index 293abf26..91da36ed 100644 --- a/ct/zwave-js-ui-v5.sh +++ b/ct/zwave-js-ui-v5.sh @@ -64,18 +64,17 @@ function msg_error() { } function PVE_CHECK() { - PVE=$(pveversion | grep "pve-manager/7" | wc -l) - if [[ $PVE != 1 ]]; then - echo -e "${RD}This script requires Proxmox Virtual Environment 7.0 or greater${CL}" - echo -e "Exiting..." - sleep 2 - exit - fi +if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.0 or higher" + echo -e "Exiting..." + sleep 2 + exit +fi } function ARCH_CHECK() { - ARCH=$(dpkg --print-architecture) - if [[ "$ARCH" != "amd64" ]]; then - echo -e "\n ❌ This script will not work with PiMox! \n" + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" echo -e "Exiting..." sleep 2 exit @@ -362,6 +361,7 @@ exit } clear ARCH_CHECK +PVE_CHECK if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi if [ "$VERB" == "yes" ]; then set -x; fi if [ "$CT_TYPE" == "1" ]; then