浏览代码

code refactoring (#1047)

tteckster 2 年之前
父节点
当前提交
8e98eb0617
共有 82 个文件被更改,包括 2760 次插入2653 次删除
  1. 34 32
      ct/adguard-v5.sh
  2. 29 33
      ct/alpine-v5.sh
  3. 29 33
      ct/archlinux-v5.sh
  4. 29 29
      ct/audiobookshelf-v5.sh
  5. 34 32
      ct/autobrr-v5.sh
  6. 34 33
      ct/blocky-v5.sh
  7. 36 36
      ct/casaos-v5.sh
  8. 34 33
      ct/changedetection-v5.sh
  9. 29 34
      ct/cronicle-v5.sh
  10. 34 33
      ct/daemonsync-v5.sh
  11. 33 33
      ct/dashy-v5.sh
  12. 29 29
      ct/debian-v5.sh
  13. 34 33
      ct/deconz-v5.sh
  14. 35 30
      ct/deluge-v5.sh
  15. 29 29
      ct/devuan-v5.sh
  16. 32 35
      ct/docker-v5.sh
  17. 33 33
      ct/emby-v5.sh
  18. 29 33
      ct/emqx-v5.sh
  19. 34 33
      ct/esphome-v5.sh
  20. 34 33
      ct/grafana-v5.sh
  21. 34 33
      ct/grocy-v5.sh
  22. 34 33
      ct/heimdalldashboard-v5.sh
  23. 33 32
      ct/homeassistant-core-v5.sh
  24. 37 36
      ct/homeassistant-v5.sh
  25. 34 33
      ct/homebridge-v5.sh
  26. 34 33
      ct/homepage-v5.sh
  27. 34 29
      ct/homer-v5.sh
  28. 34 33
      ct/hyperion-v5.sh
  29. 34 33
      ct/influxdb-v5.sh
  30. 34 33
      ct/iobroker-v5.sh
  31. 34 33
      ct/jellyfin-v5.sh
  32. 34 33
      ct/k0s-v5.sh
  33. 34 32
      ct/kavita-v5.sh
  34. 34 33
      ct/keycloak-v5.sh
  35. 34 29
      ct/lidarr-v5.sh
  36. 34 33
      ct/magicmirror-v5.sh
  37. 34 33
      ct/mariadb-v5.sh
  38. 34 33
      ct/meshcentral-v5.sh
  39. 34 33
      ct/motioneye-v5.sh
  40. 34 32
      ct/mqtt-v5.sh
  41. 34 33
      ct/n8n-v5.sh
  42. 33 33
      ct/navidrome-v5.sh
  43. 34 33
      ct/nextcloudpi-v5.sh
  44. 34 33
      ct/nginxproxymanager-v5.sh
  45. 34 34
      ct/nocodb-v5.sh
  46. 33 33
      ct/node-red-v5.sh
  47. 45 33
      ct/omada-v5.sh
  48. 34 33
      ct/omv-v5.sh
  49. 34 33
      ct/openhab-v5.sh
  50. 33 33
      ct/paperless-ngx-v5.sh
  51. 35 33
      ct/photoprism-v5.sh
  52. 34 33
      ct/pihole-v5.sh
  53. 34 33
      ct/plex-v5.sh
  54. 33 33
      ct/podman-homeassistant-v5.sh
  55. 34 33
      ct/podman-v5.sh
  56. 34 33
      ct/postgresql-v5.sh
  57. 34 33
      ct/prometheus-v5.sh
  58. 34 29
      ct/prowlarr-v5.sh
  59. 34 29
      ct/radarr-v5.sh
  60. 34 29
      ct/readarr-v5.sh
  61. 36 36
      ct/rockylinux-v5.sh
  62. 34 29
      ct/sabnzbd-v5.sh
  63. 34 33
      ct/scrypted-v5.sh
  64. 34 33
      ct/shinobi-v5.sh
  65. 34 29
      ct/sonarr-v5.sh
  66. 34 33
      ct/syncthing-v5.sh
  67. 34 29
      ct/tdarr-v5.sh
  68. 34 33
      ct/technitiumdns-v5.sh
  69. 34 29
      ct/transmission-v5.sh
  70. 34 33
      ct/trilium-v5.sh
  71. 29 29
      ct/ubuntu-v5.sh
  72. 37 36
      ct/umbrel-v5.sh
  73. 34 33
      ct/unifi-v5.sh
  74. 34 33
      ct/uptimekuma-v5.sh
  75. 33 32
      ct/vaultwarden-v5.sh
  76. 34 29
      ct/whisparr-v5.sh
  77. 34 33
      ct/whoogle-v5.sh
  78. 34 33
      ct/wikijs-v5.sh
  79. 33 33
      ct/wireguard-v5.sh
  80. 34 29
      ct/yunohost-v5.sh
  81. 34 33
      ct/zigbee2mqtt-v5.sh
  82. 34 33
      ct/zwave-js-ui-v5.sh

+ 34 - 32
ct/adguard-v5.sh

@@ -61,8 +61,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -71,39 +71,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-    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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
+
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
   CT_TYPE="1"
@@ -328,6 +307,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -366,7 +346,29 @@ msg_ok "Update Successfull"
 exit
 }
 
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/AdGuardHome ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 29 - 33
ct/alpine-v5.sh

@@ -61,8 +61,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -71,40 +71,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -325,6 +302,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -345,7 +323,25 @@ apk upgrade &>/dev/null
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 29 - 33
ct/archlinux-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -349,7 +327,25 @@ pacman -Sy archlinux-keyring && pacman -Su
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 29 - 29
ct/audiobookshelf-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,36 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}"
@@ -324,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -344,7 +326,25 @@ apt-get -y upgrade &>/dev/null
 msg_ok "Updated $APP LXC"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 32
ct/autobrr-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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 [ "$(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)
-    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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    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 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -358,7 +337,30 @@ msg_ok "Started ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /root/.config/autobrr/config.toml ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/blocky-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/blocky ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 36 - 36
ct/casaos-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -140,7 +117,7 @@ function default_settings() {
   VLAN=""
   echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}"
   SSH="no"
-  echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}"
+  echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}"
   FUSE="no"
   echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}"
   VERB="no"
@@ -312,10 +289,10 @@ function advanced_settings() {
       SSH="no"
   fi
   if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then
-      echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}Yes${CL}"
+      echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}Yes${CL}"
       FUSE="yes"
   else
-      echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}"
+      echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}"
       FUSE="no"
   fi
   if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then
@@ -337,6 +314,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -358,7 +336,29 @@ msg_ok "Update Successfull"
 exit
 }
 
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /etc/docker ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$FUSE" == "yes" ]; then 
 FEATURES="fuse=1,keyctl=1,nesting=1"

+ 34 - 33
ct/changedetection-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -348,7 +326,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/changedetection.service ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 29 - 34
ct/cronicle-v5.sh

@@ -61,8 +61,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -71,37 +71,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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} 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
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -326,7 +306,9 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 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}"
@@ -356,10 +338,6 @@ msg_ok "Updated ${APP}"
 exit
 fi
 if [ "$UPD" == "2" ]; then
-  if [[ -d /opt/cronicle ]]; then
-    msg_error "${APP} Installation Found!";
-    exit 
-  fi
 LATEST=$(curl -sL https://api.github.com/repos/jhuckaby/Cronicle/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
 IP=$(hostname -I | awk '{print $1}')
 msg_info "Installing Dependencies"
@@ -395,7 +373,24 @@ exit
 fi
 }
 
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/daemonsync-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /etc/daemonsync ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 33 - 33
ct/dashy-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -375,7 +353,29 @@ msg_ok "Update Successfull"
 exit
 }
 
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/dashy.service ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 29 - 29
ct/debian-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,36 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -324,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -344,7 +326,25 @@ apt-get -y upgrade &>/dev/null
 msg_ok "Updated $APP LXC"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/deconz-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}"
@@ -329,6 +306,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -350,7 +328,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/deconz.list ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 35 - 30
ct/deluge-v5.sh

@@ -61,8 +61,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -71,36 +71,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -325,6 +306,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -341,11 +323,34 @@ function update_script() {
 header_info
 msg_info "Updating $APP LXC"
 apt-get update &>/dev/null
-apt-get -y upgrade &>/dev/null
+pip3 install deluge[all] --upgrade
 msg_ok "Updated $APP LXC"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/deluged.service ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 29 - 29
ct/devuan-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,36 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -324,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -344,7 +326,25 @@ apt-get -y upgrade &>/dev/null
 msg_ok "Updated $APP LXC"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 32 - 35
ct/docker-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,39 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then
-    echo "User selected Yes"
-  else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -139,7 +117,7 @@ function default_settings() {
   VLAN=""
   echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}"
   SSH="no"
-  echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}"
+  echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}"
   FUSE="no"
   echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}"
   VERB="no"
@@ -311,10 +289,10 @@ function advanced_settings() {
       SSH="no"
   fi
   if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then
-      echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}Yes${CL}"
+      echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}Yes${CL}"
       FUSE="yes"
   else
-      echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}"
+      echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}"
       FUSE="no"
   fi
   if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then
@@ -336,6 +314,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -355,7 +334,25 @@ apt-get -y upgrade &>/dev/null
 msg_ok "Updated ${APP} LXC"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$FUSE" == "yes" ]; then 
 FEATURES="fuse=1,keyctl=1,nesting=1"

+ 33 - 33
ct/emby-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}"
@@ -337,6 +314,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -368,7 +346,29 @@ msg_ok "Update Successfull"
 exit
 }
 
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/emby-server ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 29 - 33
ct/emqx-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -348,7 +326,25 @@ apt-get -y upgrade &>/dev/null
 msg_ok "Updated ${APP} LXC"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/esphome-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -355,7 +333,30 @@ msg_ok "Started ESPHome"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /usr/local/bin/esphome ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/grafana-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/grafana.list ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/grocy-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -348,7 +326,30 @@ msg_ok "Updated ${APP}"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apache2/sites-available/grocy.conf ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/heimdalldashboard-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -428,7 +406,30 @@ msg_ok "Started ${APP}"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/Heimdall ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 33 - 32
ct/homeassistant-core-v5.sh

@@ -62,8 +62,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -72,39 +72,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC SUPPORT" --yesno "This provides Support for ${APP} LXC" 10 58); then
-    echo "User selected Support"
-  else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -331,6 +309,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -423,7 +402,29 @@ exit
 fi
 }
 
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /srv/homeassistant ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 37 - 36
ct/homeassistant-v5.sh

@@ -61,8 +61,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -71,40 +71,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC SUPPORT" --yesno "This provides Support for ${APP} LXC. Proceed?" 10 58); then
-    echo "User selected support"
-  else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -141,7 +118,7 @@ function default_settings() {
   VLAN=""
   echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}"
   SSH="no"
-  echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}"
+  echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}"
   FUSE="no"
   echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}"
   VERB="no"
@@ -314,10 +291,10 @@ function advanced_settings() {
       SSH="no"
   fi
   if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then
-      echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}Yes${CL}"
+      echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}Yes${CL}"
       FUSE="yes"
   else
-      echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}"
+      echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}"
       FUSE="no"
   fi
   if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then
@@ -339,6 +316,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -423,7 +401,30 @@ exit
 fi
 }
 
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /var/lib/docker/volumes/hass_config/_data
+ ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$FUSE" == "yes" ]; then 
 FEATURES="fuse=1,keyctl=1,nesting=1"

+ 34 - 33
ct/homebridge-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/homebridge.service ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/homepage-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -355,7 +333,30 @@ systemctl start homepage
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/homepage.service ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 29
ct/homer-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,36 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -324,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -368,7 +350,30 @@ msg_ok "Started ${APP}"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/homer ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/hyperion-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/hyperion.list ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/influxdb-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/influxdb.list ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/iobroker-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/iobroker ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/jellyfin-v5.sh

@@ -61,8 +61,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -71,40 +71,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}"
@@ -339,6 +316,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -358,7 +336,30 @@ apt-get -y upgrade &>/dev/null
 msg_ok "Updated ${APP} LXC"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /usr/lib/jellyfin ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/k0s-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/k0s/k0s.yaml ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 32
ct/kavita-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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 [ "$(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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    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 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -347,7 +326,30 @@ apt-get -y upgrade &>/dev/null
 msg_ok "Updated $APP LXC"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/Kavita ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/keycloak-v5.sh

@@ -61,8 +61,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -71,40 +71,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -329,6 +306,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -350,7 +328,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/keycloak.service ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 29
ct/lidarr-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,36 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -324,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -344,7 +326,30 @@ apt-get -y upgrade &>/dev/null
 msg_ok "Updated $APP LXC"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /var/lib/lidarr/ ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/magicmirror-v5.sh

@@ -61,8 +61,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -71,40 +71,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -329,6 +306,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -351,7 +329,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/magicmirror ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/mariadb-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/mariadb.list ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/meshcentral-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/meshcentral ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/motioneye-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -348,7 +326,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/motioneye.service ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 32
ct/mqtt-v5.sh

@@ -59,8 +59,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -69,39 +69,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-    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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
+
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
   CT_TYPE="1"
@@ -326,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -348,7 +328,29 @@ msg_ok "Update Successfull"
 exit
 }
 
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/mosquitto-bullseye.list ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/n8n-v5.sh

@@ -61,8 +61,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -71,40 +71,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -329,6 +306,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/n8n.service ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 33 - 33
ct/navidrome-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -360,7 +338,29 @@ msg_ok "Update Successfull"
 exit
 }
 
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/navidrome ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/nextcloudpi-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /lib/systemd/system/nextcloud-domain.service ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/nginxproxymanager-v5.sh

@@ -61,8 +61,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -71,40 +71,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -329,6 +306,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -458,7 +436,30 @@ msg_ok "Cleaned"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /lib/systemd/system/npm.service ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 34
ct/nocodb-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -349,10 +327,32 @@ npm install -s --save nocodb &>/dev/null
 systemctl restart nocodb.service
 msg_ok "Updated ${APP}"
 msg_ok "Update Successfull"
-
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/nocodb.service ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 33 - 33
ct/node-red-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC SUPPORT" --yesno "This provides Support for ${APP} LXC. Proceed?" 10 58); then
-    echo "User selected support"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -384,7 +362,29 @@ exit
 fi
 }
 
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /root/.node-red ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 45 - 33
ct/omada-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}"
@@ -337,6 +314,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -347,8 +325,42 @@ header_info
     echo -e "${RD}Using Advanced Settings${CL}"
     advanced_settings
   fi
+  exit
+}
+
+function update_script() {
+header_info
+msg_info "Updating ${APP} LXC"
+apt-get update &>/dev/null
+apt-get -y upgrade &>/dev/null
+msg_ok "Updated ${APP} LXC"
+msg_ok "Update Successfull"
+exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/tplink ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/omv-v5.sh

@@ -61,8 +61,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -71,40 +71,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}"
@@ -329,6 +306,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -350,7 +328,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/openmediavault.list ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/openhab-v5.sh

@@ -61,8 +61,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -71,40 +71,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -329,6 +306,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -350,7 +328,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/openhab.list ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 33 - 33
ct/paperless-ngx-v5.sh

@@ -61,8 +61,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -71,40 +71,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC SUPPORT" --yesno "This provides Support for ${APP} LXC. Proceed?" 10 58); then
-    echo "User selected support"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -329,6 +306,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -417,7 +395,29 @@ exit
 fi
 }
 
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/paperless ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 35 - 33
ct/photoprism-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,18 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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 [[ ! -d /opt/photoprism ]]; then
-    msg_error "No PhotoPrism Installation Found!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then
-    echo "User selected Yes"
-  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 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -370,7 +349,30 @@ msg_ok "Started PhotoPrism"
 msg_ok "Update Successful"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/photoprism ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/pihole-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /etc/pihole ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/plex-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}"
@@ -338,6 +315,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -368,7 +346,30 @@ bash -c "$(wget -qO - https://raw.githubusercontent.com/mrworf/plexupdate/master
 exit
 fi
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 33 - 33
ct/podman-homeassistant-v5.sh

@@ -64,8 +64,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -74,40 +74,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -332,6 +309,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -400,7 +378,29 @@ exit
 fi
 }
 
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/homeassistant.service ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/podman-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/containers/registries.conf ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/postgresql-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/pgdg.list ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/prometheus-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -349,7 +327,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/prometheus.service ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 29
ct/prowlarr-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,36 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -324,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -344,7 +326,30 @@ apt-get -y upgrade &>/dev/null
 msg_ok "Updated $APP LXC"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /var/lib/prowlarr/ ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 29
ct/radarr-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,36 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -324,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -344,7 +326,30 @@ apt-get -y upgrade &>/dev/null
 msg_ok "Updated $APP LXC"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /var/lib/radarr/ ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 29
ct/readarr-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,36 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -324,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -344,7 +326,30 @@ apt-get -y upgrade &>/dev/null
 msg_ok "Updated $APP LXC"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /var/lib/readarr/ ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 36 - 36
ct/rockylinux-v5.sh

@@ -61,8 +61,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -71,40 +71,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -329,6 +306,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -344,13 +322,35 @@ header_info
 function update_script() {
 header_info
 msg_info "Updating ${APP} LXC"
-pacman-key --init
-pacman-key --populate archlinux
-pacman -Sy archlinux-keyring && pacman -Su
+dnf -y update
+dnf -y upgrade
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /etc/pacman.d ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 29
ct/sabnzbd-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,36 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -324,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -344,7 +326,30 @@ apt-get -y upgrade &>/dev/null
 msg_ok "Updated $APP LXC"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/sabnzbd ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/scrypted-v5.sh

@@ -61,8 +61,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -71,40 +71,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -329,6 +306,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -350,7 +328,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/scrypted.service ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/shinobi-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}"
@@ -337,6 +314,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -359,7 +337,30 @@ pm2 restart cron
 msg_ok "Updated Shinobi LXC"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/Shinobi ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 29
ct/sonarr-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,36 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -324,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -344,7 +326,30 @@ apt-get -y upgrade &>/dev/null
 msg_ok "Updated $APP LXC"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/sonarr.list ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/syncthing-v5.sh

@@ -61,8 +61,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -71,40 +71,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -329,6 +306,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -350,7 +328,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/sources.list.d/syncthing.list ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 29
ct/tdarr-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,36 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -324,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -344,7 +326,30 @@ apt-get -y upgrade &>/dev/null
 msg_ok "Updated $APP LXC"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/tdarr ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/technitiumdns-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -411,7 +389,30 @@ fi
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /etc/dns ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 29
ct/transmission-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,36 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -324,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -344,7 +326,30 @@ apt-get -y upgrade &>/dev/null
 msg_ok "Updated ${APP} LXC"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/transmission-daemon/settings.json ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/trilium-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -368,7 +346,30 @@ msg_ok "Started ${APP}"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d ! -d /opt/trilium ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 29 - 29
ct/ubuntu-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,36 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using ${var_os} Version: ${BGN}${var_version}${CL}"
@@ -333,6 +314,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -352,7 +334,25 @@ apt-get -y upgrade &>/dev/null
 msg_ok "Updated ${APP} LXC"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 37 - 36
ct/umbrel-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -140,7 +117,7 @@ function default_settings() {
   VLAN=""
   echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}"
   SSH="no"
-  echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}"
+  echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}"
   FUSE="no"
   echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}"
   VERB="no"
@@ -312,10 +289,10 @@ function advanced_settings() {
       SSH="no"
   fi
   if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then
-      echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}Yes${CL}"
+      echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}Yes${CL}"
       FUSE="yes"
   else
-      echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}"
+      echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}"
       FUSE="no"
   fi
   if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then
@@ -337,6 +314,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -356,7 +334,30 @@ apt-get -y upgrade &>/dev/null
 msg_ok "Updated ${APP} LXC"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /root/umbrel ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$FUSE" == "yes" ]; then 
 FEATURES="fuse=1,keyctl=1,nesting=1"

+ 34 - 33
ct/unifi-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -349,7 +327,30 @@ msg_ok "Updated ${APP}"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /usr/lib/unifi ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/uptimekuma-v5.sh

@@ -61,8 +61,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -71,40 +71,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -329,6 +306,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -366,7 +344,30 @@ msg_ok "Started ${APP}"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/uptime-kuma ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 33 - 32
ct/vaultwarden-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,39 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC SUPPORT" --yesno "This provides Support for ${APP} LXC. Proceed?" 10 58); then
-    echo "User selected support"
-  else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +306,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -417,7 +396,29 @@ exit
 fi
 }
 
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/systemd/system/vaultwarden.service ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 29
ct/whisparr-v5.sh

@@ -61,8 +61,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -71,36 +71,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -325,6 +306,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -345,7 +327,30 @@ apt-get -y upgrade &>/dev/null
 msg_ok "Updated $APP LXC"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /var/lib/whisparr ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/whoogle-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -348,7 +326,30 @@ msg_ok "Updated ${APP} LXC"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /usr/local/bin/whoogle-search ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/wikijs-v5.sh

@@ -61,8 +61,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -71,40 +71,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -329,6 +306,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -362,7 +340,30 @@ msg_ok "Started ${APP}"
 msg_ok "Update Successfull"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/wikijs ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 33 - 33
ct/wireguard-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC SUPPORT" --yesno "This provides Support for ${APP} LXC. Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -404,7 +382,29 @@ exit
 fi
 }
 
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /etc/pivpn/wireguard ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 29
ct/yunohost-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,36 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
@@ -324,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -344,7 +326,30 @@ apt-get -y upgrade &>/dev/null
 msg_ok "Updated $APP LXC"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/apt/trusted.gpg.d/php.gpg ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/zigbee2mqtt-v5.sh

@@ -61,8 +61,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -71,40 +71,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}"
@@ -329,6 +306,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -395,7 +373,30 @@ start_zigbee2mqtt
 echo "Done!"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/zigbee2mqtt ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"

+ 34 - 33
ct/zwave-js-ui-v5.sh

@@ -60,8 +60,8 @@ function msg_ok() {
 }
 
 function msg_error() {
-    local msg="$1"
-    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
+  local msg="$1"
+  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 }
 
 function PVE_CHECK() {
@@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
   echo -e "Requires PVE Version 7.0 or higher"
   echo -e "Exiting..."
   sleep 2
-  exit
+exit
 fi
 }
 function ARCH_CHECK() {
-  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)
-  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!";
-    exit 
-  fi
-  if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
-    echo "User selected Update"
-    else
-    clear
-    echo -e "⚠ User exited script \n"
-    exit
-  fi
+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
+}
 
 function default_settings() {
   echo -e "${DGN}Using Container Type: ${BGN}Privileged${CL}"
@@ -328,6 +305,7 @@ function advanced_settings() {
 function install_script() {
 ARCH_CHECK
 PVE_CHECK
+NEXTID=$(pvesh get /cluster/nextid)
 header_info
   if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
     header_info
@@ -362,7 +340,30 @@ msg_ok "Cleaned"
 msg_ok "Updated Successfully!\n"
 exit
 }
-if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; 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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  install_script
+fi
+
+if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /opt/zwave-js-ui ]]; then
+  msg_error "No ${APP} Installation Found!"
+  exit 
+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
+    clear
+    echo -e "⚠  User exited script \n"
+    exit
+  fi
+  update_script
+fi
+
 if [ "$VERB" == "yes" ]; then set -x; fi
 if [ "$CT_TYPE" == "1" ]; then
   FEATURES="nesting=1,keyctl=1"