diff --git a/ct/adguard-v5.sh b/ct/adguard-v5.sh index 844fd239..95f0aac0 100644 --- a/ct/adguard-v5.sh +++ b/ct/adguard-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /opt/AdGuardHome ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/alpine-v5.sh b/ct/alpine-v5.sh index 01242e04..680dcb32 100644 --- a/ct/alpine-v5.sh +++ b/ct/alpine-v5.sh @@ -83,15 +83,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/alpine-release ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/archlinux-v5.sh b/ct/archlinux-v5.sh index f9154d57..fa20c542 100644 --- a/ct/archlinux-v5.sh +++ b/ct/archlinux-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /etc/pacman.d ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/audiobookshelf-v5.sh b/ct/audiobookshelf-v5.sh index 51f3fbe5..a5b82fcc 100644 --- a/ct/audiobookshelf-v5.sh +++ b/ct/audiobookshelf-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then echo "User selected Update" diff --git a/ct/autobrr-v5.sh b/ct/autobrr-v5.sh index 4f1ed7cd..35cc9cb9 100644 --- a/ct/autobrr-v5.sh +++ b/ct/autobrr-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /root/.config/autobrr ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/blocky-v5.sh b/ct/blocky-v5.sh index bc869719..29e9e1db 100644 --- a/ct/blocky-v5.sh +++ b/ct/blocky-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /opt/blocky/ ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/casaos-v5.sh b/ct/casaos-v5.sh index 8657add4..33009478 100644 --- a/ct/casaos-v5.sh +++ b/ct/casaos-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /etc/docker ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/changedetection-v5.sh b/ct/changedetection-v5.sh index 4df5b5b3..54f0cb74 100644 --- a/ct/changedetection-v5.sh +++ b/ct/changedetection-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/systemd/system/changedetection.service ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/cronicle-v5.sh b/ct/cronicle-v5.sh index 7b1835c1..2ffa9fdc 100644 --- a/ct/cronicle-v5.sh +++ b/ct/cronicle-v5.sh @@ -83,26 +83,6 @@ function ARCH_CHECK() { fi } -if command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} Master LXC. Proceed?" 10 58); then - NEXTID=$(pvesh get /cluster/nextid) - SERVER="y" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi -if ! command -v pveversion >/dev/null 2>&1; then - if (whiptail --title "${APP} SUPPORT" --yesno "Options to Update or Install ${APP} Worker on $hostname. Proceed?" 10 58); then - echo "User selected Support" - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi - function default_settings() { echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" CT_TYPE="1" @@ -327,6 +307,7 @@ function install_script() { ARCH_CHECK PVE_CHECK header_info +SERVER="y" if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then header_info echo -e "${BL}Using Default Settings${CL}" diff --git a/ct/daemonsync-v5.sh b/ct/daemonsync-v5.sh index 339180a7..7c686c66 100644 --- a/ct/daemonsync-v5.sh +++ b/ct/daemonsync-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /etc/daemonsync ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/dashy-v5.sh b/ct/dashy-v5.sh index 9449b137..c8d10075 100644 --- a/ct/dashy-v5.sh +++ b/ct/dashy-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/systemd/system/dashy.service ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/debian-v5.sh b/ct/debian-v5.sh index 8819bc73..6fbb876c 100644 --- a/ct/debian-v5.sh +++ b/ct/debian-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then echo "User selected Update" diff --git a/ct/deconz-v5.sh b/ct/deconz-v5.sh index 0ba3f34f..d56d0e13 100644 --- a/ct/deconz-v5.sh +++ b/ct/deconz-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/apt/sources.list.d/deconz.list ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/deluge-v5.sh b/ct/deluge-v5.sh index 49f23d87..72375c70 100644 --- a/ct/deluge-v5.sh +++ b/ct/deluge-v5.sh @@ -83,15 +83,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then echo "User selected Update" diff --git a/ct/devuan-v5.sh b/ct/devuan-v5.sh index 65b4e0ea..bf604661 100644 --- a/ct/devuan-v5.sh +++ b/ct/devuan-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then echo "User selected Update" diff --git a/ct/docker-v5.sh b/ct/docker-v5.sh index cc5e4797..76d60e75 100644 --- a/ct/docker-v5.sh +++ b/ct/docker-v5.sh @@ -81,15 +81,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /etc/docker ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/emby-v5.sh b/ct/emby-v5.sh index 1874ee85..6d67bb48 100644 --- a/ct/emby-v5.sh +++ b/ct/emby-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /opt/emby-server ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/emqx-v5.sh b/ct/emqx-v5.sh index 614b4045..3e4f32e4 100644 --- a/ct/emqx-v5.sh +++ b/ct/emqx-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/apt/sources.list.d/emqx_emqx.list ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/esphome-v5.sh b/ct/esphome-v5.sh index 91dbc0b5..bc6c407b 100644 --- a/ct/esphome-v5.sh +++ b/ct/esphome-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /usr/local/bin/esphome ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/grafana-v5.sh b/ct/grafana-v5.sh index 2662a04d..01d2dbdb 100644 --- a/ct/grafana-v5.sh +++ b/ct/grafana-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/apt/sources.list.d/grafana.list ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/grocy-v5.sh b/ct/grocy-v5.sh index 9563990b..6106533c 100644 --- a/ct/grocy-v5.sh +++ b/ct/grocy-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/apache2/sites-available/grocy.conf ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/heimdalldashboard-v5.sh b/ct/heimdalldashboard-v5.sh index 6596aa0b..f51e4359 100644 --- a/ct/heimdalldashboard-v5.sh +++ b/ct/heimdalldashboard-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /opt/Heimdall ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/homeassistant-core-v5.sh b/ct/homeassistant-core-v5.sh index e3ada4d1..dbc43d87 100644 --- a/ct/homeassistant-core-v5.sh +++ b/ct/homeassistant-core-v5.sh @@ -83,15 +83,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /srv/homeassistant ]]; then msg_error "No Home Assistant Core Installation Found!"; diff --git a/ct/homeassistant-v5.sh b/ct/homeassistant-v5.sh index ee46dbe8..0d5e9621 100644 --- a/ct/homeassistant-v5.sh +++ b/ct/homeassistant-v5.sh @@ -83,15 +83,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /root/hass_config ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/homebridge-v5.sh b/ct/homebridge-v5.sh index 80634649..f80ec5a9 100644 --- a/ct/homebridge-v5.sh +++ b/ct/homebridge-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/apt/sources.list.d/emqx_emqx.list ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/homepage-v5.sh b/ct/homepage-v5.sh index fae8323e..c24088da 100644 --- a/ct/homepage-v5.sh +++ b/ct/homepage-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/systemd/system/homepage.service ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/homer-v5.sh b/ct/homer-v5.sh index 36c823ef..94453651 100644 --- a/ct/homer-v5.sh +++ b/ct/homer-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then echo "User selected Update" diff --git a/ct/hyperion-v5.sh b/ct/hyperion-v5.sh index 29c990c5..dbc023c6 100644 --- a/ct/hyperion-v5.sh +++ b/ct/hyperion-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/apt/sources.list.d/hyperion.list ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/influxdb-v5.sh b/ct/influxdb-v5.sh index ec9f8b24..f4af5ee9 100644 --- a/ct/influxdb-v5.sh +++ b/ct/influxdb-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/apt/sources.list.d/influxdb.list ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/iobroker-v5.sh b/ct/iobroker-v5.sh index 9e37fd2b..ac0b9c06 100644 --- a/ct/iobroker-v5.sh +++ b/ct/iobroker-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /opt/iobroker ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/jellyfin-v5.sh b/ct/jellyfin-v5.sh index 51915187..366192eb 100644 --- a/ct/jellyfin-v5.sh +++ b/ct/jellyfin-v5.sh @@ -83,15 +83,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /usr/lib/jellyfin ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/k0s-v5.sh b/ct/k0s-v5.sh index e91106f2..f3a217f2 100644 --- a/ct/k0s-v5.sh +++ b/ct/k0s-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/k0s/k0s.yaml ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/kavita-v5.sh b/ct/kavita-v5.sh index 94bd161d..dfdfe374 100644 --- a/ct/kavita-v5.sh +++ b/ct/kavita-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /opt/Kavita ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/keycloak-v5.sh b/ct/keycloak-v5.sh index b106d2c9..9ce212b0 100644 --- a/ct/keycloak-v5.sh +++ b/ct/keycloak-v5.sh @@ -83,15 +83,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/systemd/system/keycloak.service ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/lidarr-v5.sh b/ct/lidarr-v5.sh index fe6acc9a..f8ae7930 100644 --- a/ct/lidarr-v5.sh +++ b/ct/lidarr-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then echo "User selected Update" diff --git a/ct/magicmirror-v5.sh b/ct/magicmirror-v5.sh index c6802492..721f52e7 100644 --- a/ct/magicmirror-v5.sh +++ b/ct/magicmirror-v5.sh @@ -83,15 +83,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /opt/magicmirror ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/mariadb-v5.sh b/ct/mariadb-v5.sh index e56b6b44..b07c459f 100644 --- a/ct/mariadb-v5.sh +++ b/ct/mariadb-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/apt/sources.list.d/mariadb.list ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/meshcentral-v5.sh b/ct/meshcentral-v5.sh index 1b16dc68..86c30e42 100644 --- a/ct/meshcentral-v5.sh +++ b/ct/meshcentral-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /opt/meshcentral ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/motioneye-v5.sh b/ct/motioneye-v5.sh index 0017ab4d..d3ce34c4 100644 --- a/ct/motioneye-v5.sh +++ b/ct/motioneye-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/systemd/system/motioneye.service ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/mqtt-v5.sh b/ct/mqtt-v5.sh index efe46ded..0516d8f8 100644 --- a/ct/mqtt-v5.sh +++ b/ct/mqtt-v5.sh @@ -80,15 +80,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/apt/sources.list.d/mosquitto-bullseye.list ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/n8n-v5.sh b/ct/n8n-v5.sh index c6828567..2d5c2cf6 100644 --- a/ct/n8n-v5.sh +++ b/ct/n8n-v5.sh @@ -83,15 +83,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/systemd/system/n8n.service ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/navidrome-v5.sh b/ct/navidrome-v5.sh index bc6db67b..73af941b 100644 --- a/ct/navidrome-v5.sh +++ b/ct/navidrome-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /opt/navidrome ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/nextcloudpi-v5.sh b/ct/nextcloudpi-v5.sh index 2afbaa12..4f86c9e9 100644 --- a/ct/nextcloudpi-v5.sh +++ b/ct/nextcloudpi-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /lib/systemd/system/nextcloud-domain.service ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/nginxproxymanager-v5.sh b/ct/nginxproxymanager-v5.sh index aa9ca1a9..7a4b97c1 100644 --- a/ct/nginxproxymanager-v5.sh +++ b/ct/nginxproxymanager-v5.sh @@ -83,15 +83,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /lib/systemd/system/npm.service ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/nocodb-v5.sh b/ct/nocodb-v5.sh index 929112bd..de400c91 100644 --- a/ct/nocodb-v5.sh +++ b/ct/nocodb-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/systemd/system/nocodb.service ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/node-red-v5.sh b/ct/node-red-v5.sh index f5f1fba1..eb2c1816 100644 --- a/ct/node-red-v5.sh +++ b/ct/node-red-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /root/.node-red ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/omada-v5.sh b/ct/omada-v5.sh index ae6ad8a5..4da27880 100644 --- a/ct/omada-v5.sh +++ b/ct/omada-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /opt/tplink ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/omv-v5.sh b/ct/omv-v5.sh index 13b0bb86..e6abb7ce 100644 --- a/ct/omv-v5.sh +++ b/ct/omv-v5.sh @@ -83,15 +83,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/apt/sources.list.d/openmediavault.list ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/openhab-v5.sh b/ct/openhab-v5.sh index bb41242f..9cb508c5 100644 --- a/ct/openhab-v5.sh +++ b/ct/openhab-v5.sh @@ -83,15 +83,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/apt/sources.list.d/openhab.list ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/paperless-ngx-v5.sh b/ct/paperless-ngx-v5.sh index fa744442..73de63a1 100644 --- a/ct/paperless-ngx-v5.sh +++ b/ct/paperless-ngx-v5.sh @@ -83,15 +83,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /opt/paperless ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/photoprism-v5.sh b/ct/photoprism-v5.sh index 4953243d..991dcb10 100644 --- a/ct/photoprism-v5.sh +++ b/ct/photoprism-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /opt/photoprism ]]; then msg_error "No PhotoPrism Installation Found!"; diff --git a/ct/pihole-v5.sh b/ct/pihole-v5.sh index b2b7db58..9b99e243 100644 --- a/ct/pihole-v5.sh +++ b/ct/pihole-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /etc/pihole ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/plex-v5.sh b/ct/plex-v5.sh index e7188938..6c64b28d 100644 --- a/ct/plex-v5.sh +++ b/ct/plex-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/podman-homeassistant-v5.sh b/ct/podman-homeassistant-v5.sh index c1ba384f..a63e7281 100644 --- a/ct/podman-homeassistant-v5.sh +++ b/ct/podman-homeassistant-v5.sh @@ -86,15 +86,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/systemd/system/homeassistant.service ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/podman-v5.sh b/ct/podman-v5.sh index 0fa602e5..84b3ef83 100644 --- a/ct/podman-v5.sh +++ b/ct/podman-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/containers/registries.conf ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/postgresql-v5.sh b/ct/postgresql-v5.sh index a8f24ded..066ffd9e 100644 --- a/ct/postgresql-v5.sh +++ b/ct/postgresql-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/apt/sources.list.d/pgdg.list ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/prometheus-v5.sh b/ct/prometheus-v5.sh index 8d6b444f..b25a0a2f 100644 --- a/ct/prometheus-v5.sh +++ b/ct/prometheus-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/systemd/system/prometheus.service ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/prowlarr-v5.sh b/ct/prowlarr-v5.sh index dec41aee..c9887d7d 100644 --- a/ct/prowlarr-v5.sh +++ b/ct/prowlarr-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then echo "User selected Update" diff --git a/ct/radarr-v5.sh b/ct/radarr-v5.sh index 70f6d794..8a3435e2 100644 --- a/ct/radarr-v5.sh +++ b/ct/radarr-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then echo "User selected Update" diff --git a/ct/readarr-v5.sh b/ct/readarr-v5.sh index e79a0e14..ed048100 100644 --- a/ct/readarr-v5.sh +++ b/ct/readarr-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then echo "User selected Update" diff --git a/ct/rockylinux-v5.sh b/ct/rockylinux-v5.sh index 56403ea1..f67f13ad 100644 --- a/ct/rockylinux-v5.sh +++ b/ct/rockylinux-v5.sh @@ -83,15 +83,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /etc/pacman.d ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/sabnzbd-v5.sh b/ct/sabnzbd-v5.sh index d34674ca..ee7ddab2 100644 --- a/ct/sabnzbd-v5.sh +++ b/ct/sabnzbd-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then echo "User selected Update" diff --git a/ct/scrypted-v5.sh b/ct/scrypted-v5.sh index acf11373..0613523f 100644 --- a/ct/scrypted-v5.sh +++ b/ct/scrypted-v5.sh @@ -83,15 +83,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/systemd/system/scrypted.service ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/shinobi-v5.sh b/ct/shinobi-v5.sh index 08aca23c..404b84f6 100644 --- a/ct/shinobi-v5.sh +++ b/ct/shinobi-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /opt/Shinobi ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/sonarr-v5.sh b/ct/sonarr-v5.sh index 47397bdd..8230674d 100644 --- a/ct/sonarr-v5.sh +++ b/ct/sonarr-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then echo "User selected Update" diff --git a/ct/syncthing-v5.sh b/ct/syncthing-v5.sh index e6ad0979..c5ae59fe 100644 --- a/ct/syncthing-v5.sh +++ b/ct/syncthing-v5.sh @@ -83,15 +83,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/apt/sources.list.d/syncthing.list ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/tdarr-v5.sh b/ct/tdarr-v5.sh index d078ef54..f9de0b5c 100644 --- a/ct/tdarr-v5.sh +++ b/ct/tdarr-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then echo "User selected Update" diff --git a/ct/technitiumdns-v5.sh b/ct/technitiumdns-v5.sh index 374a8b32..9cae7f25 100644 --- a/ct/technitiumdns-v5.sh +++ b/ct/technitiumdns-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /etc/dns ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/transmission-v5.sh b/ct/transmission-v5.sh index 1e823bd0..7425ade1 100644 --- a/ct/transmission-v5.sh +++ b/ct/transmission-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then echo "User selected Update" diff --git a/ct/trilium-v5.sh b/ct/trilium-v5.sh index 1a8818ff..3ec7aadf 100644 --- a/ct/trilium-v5.sh +++ b/ct/trilium-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /opt/trilium/ ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/ubuntu-v5.sh b/ct/ubuntu-v5.sh index 4c8eeff3..b0dc12a1 100644 --- a/ct/ubuntu-v5.sh +++ b/ct/ubuntu-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then echo "User selected Update" diff --git a/ct/umbrel-v5.sh b/ct/umbrel-v5.sh index a0964a32..6a35e696 100644 --- a/ct/umbrel-v5.sh +++ b/ct/umbrel-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /root/umbrel ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/unifi-v5.sh b/ct/unifi-v5.sh index 08fc5a77..5e90b1d6 100644 --- a/ct/unifi-v5.sh +++ b/ct/unifi-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /usr/lib/unifi ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/uptimekuma-v5.sh b/ct/uptimekuma-v5.sh index fc2b2662..2d4cef8c 100644 --- a/ct/uptimekuma-v5.sh +++ b/ct/uptimekuma-v5.sh @@ -83,15 +83,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /opt/uptime-kuma ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/vaultwarden-v5.sh b/ct/vaultwarden-v5.sh index e08c9440..0c2f79cd 100644 --- a/ct/vaultwarden-v5.sh +++ b/ct/vaultwarden-v5.sh @@ -81,15 +81,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /etc/systemd/system/vaultwarden.service ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/whisparr-v5.sh b/ct/whisparr-v5.sh index 64b76ebf..7ba1494b 100644 --- a/ct/whisparr-v5.sh +++ b/ct/whisparr-v5.sh @@ -83,15 +83,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then echo "User selected Update" diff --git a/ct/whoogle-v5.sh b/ct/whoogle-v5.sh index a5e65954..f9908cd9 100644 --- a/ct/whoogle-v5.sh +++ b/ct/whoogle-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -f /usr/local/bin/whoogle-search ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/wikijs-v5.sh b/ct/wikijs-v5.sh index b69e504c..6451288b 100644 --- a/ct/wikijs-v5.sh +++ b/ct/wikijs-v5.sh @@ -83,15 +83,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /opt/wikijs ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/wireguard-v5.sh b/ct/wireguard-v5.sh index c18bf9f6..fd136389 100644 --- a/ct/wireguard-v5.sh +++ b/ct/wireguard-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /etc/pivpn/wireguard ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/yunohost-v5.sh b/ct/yunohost-v5.sh index bc234a6c..f0f2e5e7 100644 --- a/ct/yunohost-v5.sh +++ b/ct/yunohost-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then echo "User selected Update" diff --git a/ct/zigbee2mqtt-v5.sh b/ct/zigbee2mqtt-v5.sh index 71465d15..20d13834 100644 --- a/ct/zigbee2mqtt-v5.sh +++ b/ct/zigbee2mqtt-v5.sh @@ -83,15 +83,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /opt/zigbee2mqtt ]]; then msg_error "No ${APP} Installation Found!"; diff --git a/ct/zwave-js-ui-v5.sh b/ct/zwave-js-ui-v5.sh index 1e4dd191..8a81f613 100644 --- a/ct/zwave-js-ui-v5.sh +++ b/ct/zwave-js-ui-v5.sh @@ -82,15 +82,7 @@ function ARCH_CHECK() { 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) - else - clear - echo -e "⚠ User exited script \n" - exit - fi -fi + if ! command -v pveversion >/dev/null 2>&1; then if [[ ! -d /opt/zwave-js-ui ]]; then msg_error "No ${APP} Installation Found!";