mirror of https://github.com/tteck/Proxmox.git
				
				
				
			
							parent
							
								
									e7ec3d0275
								
							
						
					
					
						commit
						8e331fcbff
					
				| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -117,51 +118,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -171,7 +193,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -181,7 +204,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -117,51 +118,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -171,7 +193,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -181,7 +204,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -117,51 +118,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -171,7 +193,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -181,7 +204,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -117,51 +118,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -171,7 +193,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -181,7 +204,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -117,51 +118,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -171,7 +193,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -181,7 +204,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -117,51 +118,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -171,7 +193,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -181,7 +204,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -107,7 +107,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -116,51 +117,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -170,7 +192,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -180,7 +203,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -116,7 +116,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -125,51 +126,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -179,7 +201,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -189,7 +212,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -117,51 +118,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -171,7 +193,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -181,7 +204,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -107,7 +107,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -116,51 +117,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -170,7 +192,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -180,7 +203,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -107,7 +107,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -116,51 +117,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -170,7 +192,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -180,7 +203,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -107,7 +107,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -116,51 +117,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -170,7 +192,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -180,7 +203,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -107,7 +107,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -116,51 +117,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -170,7 +192,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -180,7 +203,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -117,51 +118,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -171,7 +193,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -181,7 +204,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -107,7 +107,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -116,51 +117,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -170,7 +192,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -180,7 +203,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -107,7 +107,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -116,51 +117,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -170,7 +192,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -180,7 +203,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -117,51 +118,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -171,7 +193,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -181,7 +204,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -107,7 +107,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -116,51 +117,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -170,7 +192,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -180,7 +203,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -107,7 +107,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -116,51 +117,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -170,7 +192,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -180,7 +203,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -116,7 +116,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -125,51 +126,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -179,7 +201,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -189,7 +212,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -117,51 +118,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -171,7 +193,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -181,7 +204,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -117,51 +118,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -171,7 +193,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -181,7 +204,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -107,7 +107,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -116,51 +117,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -170,7 +192,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -180,7 +203,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -107,7 +107,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -116,51 +117,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -170,7 +192,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -180,7 +203,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -107,7 +107,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -116,51 +117,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -170,7 +192,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -180,7 +203,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										76
									
								
								ct/n8n-v4.sh
								
								
								
								
							
							
						
						
									
										76
									
								
								ct/n8n-v4.sh
								
								
								
								
							| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -117,51 +118,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -171,7 +193,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -181,7 +204,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -107,7 +107,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -116,51 +117,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -170,7 +192,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -180,7 +203,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -117,51 +118,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -171,7 +193,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -181,7 +204,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -117,51 +118,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -171,7 +193,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -181,7 +204,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -107,7 +107,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -116,51 +117,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -170,7 +192,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -180,7 +203,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -107,7 +107,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -116,51 +117,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -170,7 +192,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -180,7 +203,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -116,7 +116,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -125,51 +126,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -179,7 +201,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -189,7 +212,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										76
									
								
								ct/omv-v4.sh
								
								
								
								
							
							
						
						
									
										76
									
								
								ct/omv-v4.sh
								
								
								
								
							| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -117,51 +118,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -171,7 +193,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -181,7 +204,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -117,51 +118,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -171,7 +193,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -181,7 +204,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -117,51 +118,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -171,7 +193,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -181,7 +204,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -107,7 +107,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -116,51 +117,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -170,7 +192,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -180,7 +203,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -107,7 +107,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -116,51 +117,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -170,7 +192,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -180,7 +203,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -116,7 +116,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -125,51 +126,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -179,7 +201,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -189,7 +212,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -111,7 +111,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -120,51 +121,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -174,7 +196,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -184,7 +207,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -117,51 +118,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -171,7 +193,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -181,7 +204,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -107,7 +107,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -116,51 +117,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -170,7 +192,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -180,7 +203,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -109,7 +109,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -118,51 +119,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -172,7 +194,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -182,7 +205,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -107,7 +107,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -116,51 +117,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -170,7 +192,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -180,7 +203,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -117,51 +118,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -171,7 +193,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -181,7 +204,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -116,7 +116,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -125,51 +126,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -179,7 +201,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -189,7 +212,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -117,51 +118,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -171,7 +193,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -181,7 +204,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -107,7 +107,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -116,51 +117,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -170,7 +192,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -180,7 +203,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -117,51 +118,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -171,7 +193,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -181,7 +204,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -107,7 +107,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -116,51 +117,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -170,7 +192,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -180,7 +203,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -107,7 +107,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -116,51 +117,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -170,7 +192,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -180,7 +203,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -117,51 +118,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -171,7 +193,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -181,7 +204,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -109,7 +109,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -118,51 +119,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -172,7 +194,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -182,7 +205,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -117,51 +118,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -171,7 +193,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -181,7 +204,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
 | 
				
			||||||
var_install="${NSAPP}-install"
 | 
					var_install="${NSAPP}-install"
 | 
				
			||||||
NEXTID=$(pvesh get /cluster/nextid)
 | 
					NEXTID=$(pvesh get /cluster/nextid)
 | 
				
			||||||
INTEGER='^[0-9]+$'
 | 
					INTEGER='^[0-9]+$'
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,8 @@ fi
 | 
				
			||||||
  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  PW1=$(whiptail --inputbox "Set Root Password" 8 58 --title "PASSWORD(leave blank for automatic login)" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $PW1 ]; then PW1="Automatic Login" PW=" ";
 | 
					    if [ -z $PW1 ]; then
 | 
				
			||||||
 | 
					      PW1="Automatic Login" PW=" "
 | 
				
			||||||
      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
					      echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      PW="-password $PW1"
 | 
					      PW="-password $PW1"
 | 
				
			||||||
| 
						 | 
					@ -117,51 +118,72 @@ else
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_ID ]; then CT_ID="$NEXTID"; echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}";
 | 
					  if [ -z $CT_ID ]; then
 | 
				
			||||||
 | 
					    CT_ID="$NEXTID"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CT_NAME ]; then HN="$NSAPP"; echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}";
 | 
					  if [ -z $CT_NAME ]; then
 | 
				
			||||||
 | 
					    HN="$NSAPP"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then HN=$(echo ${CT_NAME,,} | tr -d ' '); echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then
 | 
				
			||||||
 | 
					      HN=$(echo ${CT_NAME,,} | tr -d ' ')
 | 
				
			||||||
 | 
					      echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $DISK_SIZE ]; then DISK_SIZE="$var_disk"; echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}";
 | 
					  if [ -z $DISK_SIZE ]; then
 | 
				
			||||||
 | 
					    DISK_SIZE="$var_disk"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"; fi
 | 
				
			||||||
    if ! [[ $DISK_SIZE =~ $INTEGER ]] ; then echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"; advanced_settings; fi;
 | 
					    if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
 | 
				
			||||||
 | 
					      echo -e "${RD}⚠ DISK SIZE MUST BE A INTEGER NUMBER!${CL}"
 | 
				
			||||||
 | 
					      advanced_settings
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $CORE_COUNT ]; then CORE_COUNT="$var_cpu"; echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}";
 | 
					  if [ -z $CORE_COUNT ]; then
 | 
				
			||||||
 | 
					    CORE_COUNT="$var_cpu"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $RAM_SIZE ]; then RAM_SIZE="$var_ram"; echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}";
 | 
					  if [ -z $RAM_SIZE ]; then
 | 
				
			||||||
 | 
					    RAM_SIZE="$var_ram"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $BRG ]; then BRG="vmbr0"; echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}";
 | 
					  if [ -z $BRG ]; then
 | 
				
			||||||
 | 
					    BRG="vmbr0"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
if [ -z $NET ]; then NET="dhcp"; echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}";
 | 
					  if [ -z $NET ]; then
 | 
				
			||||||
 | 
					    NET="dhcp"
 | 
				
			||||||
 | 
					    echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi;
 | 
					    if [ $exitstatus = 0 ]; then echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"; fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $GATE1 ]; then GATE1="Default" GATE="";
 | 
					    if [ -z $GATE1 ]; then
 | 
				
			||||||
 | 
					      GATE1="Default" GATE=""
 | 
				
			||||||
      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
					      echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      GATE=",gw=$GATE1"
 | 
					      GATE=",gw=$GATE1"
 | 
				
			||||||
| 
						 | 
					@ -171,7 +193,8 @@ fi
 | 
				
			||||||
  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $MAC1 ]; then MAC1="Default" MAC="";
 | 
					    if [ -z $MAC1 ]; then
 | 
				
			||||||
 | 
					      MAC1="Default" MAC=""
 | 
				
			||||||
      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
					      echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      MAC=",hwaddr=$MAC1"
 | 
					      MAC=",hwaddr=$MAC1"
 | 
				
			||||||
| 
						 | 
					@ -181,7 +204,8 @@ fi
 | 
				
			||||||
  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
					  VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
 | 
				
			||||||
  exitstatus=$?
 | 
					  exitstatus=$?
 | 
				
			||||||
  if [ $exitstatus = 0 ]; then
 | 
					  if [ $exitstatus = 0 ]; then
 | 
				
			||||||
  if [ -z $VLAN1 ]; then VLAN1="Default" VLAN="";
 | 
					    if [ -z $VLAN1 ]; then
 | 
				
			||||||
 | 
					      VLAN1="Default" VLAN=""
 | 
				
			||||||
      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
					      echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      VLAN=",tag=$VLAN1"
 | 
					      VLAN=",tag=$VLAN1"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,12 +1,12 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
IP=$(hostname -I | awk '{print $1}')
 | 
					IP=$(hostname -I | awk '{print $1}')
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -66,9 +66,9 @@ apt-get install -y sudo &>/dev/null
 | 
				
			||||||
apt-get install -y git &>/dev/null
 | 
					apt-get install -y git &>/dev/null
 | 
				
			||||||
msg_ok "Installed Dependencies"
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
VERSION=$(curl -s https://api.github.com/repos/coder/code-server/releases/latest \
 | 
					VERSION=$(curl -s https://api.github.com/repos/coder/code-server/releases/latest |
 | 
				
			||||||
| grep "tag_name" \
 | 
					    grep "tag_name" |
 | 
				
			||||||
| awk '{print substr($2, 3, length($2)-4) }') \
 | 
					    awk '{print substr($2, 3, length($2)-4) }')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
msg_info "Installing Code-Server v${VERSION}"
 | 
					msg_info "Installing Code-Server v${VERSION}"
 | 
				
			||||||
curl -fOL https://github.com/coder/code-server/releases/download/v$VERSION/code-server_${VERSION}_amd64.deb &>/dev/null
 | 
					curl -fOL https://github.com/coder/code-server/releases/download/v$VERSION/code-server_${VERSION}_amd64.deb &>/dev/null
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,12 +1,12 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
clear
 | 
					clear
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -46,10 +46,12 @@ function msg_error() {
 | 
				
			||||||
    local msg="$1"
 | 
					    local msg="$1"
 | 
				
			||||||
    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 | 
					    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
if [ -z "$(ls -A /var/lib/docker/volumes/hass_config/_data/backups/)" ]; then msg_error "No backups found! \n"; exit 1; fi
 | 
					if [ -z "$(ls -A /var/lib/docker/volumes/hass_config/_data/backups/)" ]; then
 | 
				
			||||||
 | 
					    msg_error "No backups found! \n"
 | 
				
			||||||
 | 
					    exit 1
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
DIR=/var/lib/docker/volumes/hass_config/_data/restore
 | 
					DIR=/var/lib/docker/volumes/hass_config/_data/restore
 | 
				
			||||||
if [ -d "$DIR" ];
 | 
					if [ -d "$DIR" ]; then
 | 
				
			||||||
then
 | 
					 | 
				
			||||||
    msg_ok "Restore Directory Exists."
 | 
					    msg_ok "Restore Directory Exists."
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
    mkdir -p /var/lib/docker/volumes/hass_config/_data/restore
 | 
					    mkdir -p /var/lib/docker/volumes/hass_config/_data/restore
 | 
				
			||||||
| 
						 | 
					@ -58,7 +60,10 @@ fi
 | 
				
			||||||
cd /var/lib/docker/volumes/hass_config/_data/backups/
 | 
					cd /var/lib/docker/volumes/hass_config/_data/backups/
 | 
				
			||||||
PS3="Please enter your choice: "
 | 
					PS3="Please enter your choice: "
 | 
				
			||||||
files="$(ls -A .)"
 | 
					files="$(ls -A .)"
 | 
				
			||||||
select filename in ${files}; do msg_ok "You selected ${BL}${filename}${CL}"; break; done
 | 
					select filename in ${files}; do
 | 
				
			||||||
 | 
					    msg_ok "You selected ${BL}${filename}${CL}"
 | 
				
			||||||
 | 
					    break
 | 
				
			||||||
 | 
					done
 | 
				
			||||||
msg_info "Stopping Home Assistant"
 | 
					msg_info "Stopping Home Assistant"
 | 
				
			||||||
docker stop homeassistant &>/dev/null
 | 
					docker stop homeassistant &>/dev/null
 | 
				
			||||||
msg_ok "Stopped Home Assistant"
 | 
					msg_ok "Stopped Home Assistant"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,12 +1,12 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
clear
 | 
					clear
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -46,10 +46,12 @@ function msg_error() {
 | 
				
			||||||
    local msg="$1"
 | 
					    local msg="$1"
 | 
				
			||||||
    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 | 
					    echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
if [ -z "$(ls -A /root/.homeassistant/backups/)" ]; then msg_error "No backups found! \n"; exit 1; fi
 | 
					if [ -z "$(ls -A /root/.homeassistant/backups/)" ]; then
 | 
				
			||||||
 | 
					    msg_error "No backups found! \n"
 | 
				
			||||||
 | 
					    exit 1
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
DIR=/root/.homeassistant/restore
 | 
					DIR=/root/.homeassistant/restore
 | 
				
			||||||
if [ -d "$DIR" ];
 | 
					if [ -d "$DIR" ]; then
 | 
				
			||||||
then
 | 
					 | 
				
			||||||
    msg_ok "Restore Directory Exists."
 | 
					    msg_ok "Restore Directory Exists."
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
    mkdir -p /root/.homeassistant/restore
 | 
					    mkdir -p /root/.homeassistant/restore
 | 
				
			||||||
| 
						 | 
					@ -58,7 +60,10 @@ fi
 | 
				
			||||||
cd /root/.homeassistant/backups/
 | 
					cd /root/.homeassistant/backups/
 | 
				
			||||||
PS3="Please enter your choice: "
 | 
					PS3="Please enter your choice: "
 | 
				
			||||||
files="$(ls -A .)"
 | 
					files="$(ls -A .)"
 | 
				
			||||||
select filename in ${files}; do msg_ok "You selected ${BL}${filename}${CL}"; break; done
 | 
					select filename in ${files}; do
 | 
				
			||||||
 | 
					    msg_ok "You selected ${BL}${filename}${CL}"
 | 
				
			||||||
 | 
					    break
 | 
				
			||||||
 | 
					done
 | 
				
			||||||
msg_info "Stopping Home Assistant"
 | 
					msg_info "Stopping Home Assistant"
 | 
				
			||||||
sudo service homeassistant stop
 | 
					sudo service homeassistant stop
 | 
				
			||||||
msg_ok "Stopped Home Assistant"
 | 
					msg_ok "Stopped Home Assistant"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +1,11 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,12 +1,12 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
set -e
 | 
					set -e
 | 
				
			||||||
clear
 | 
					clear
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
CM='\xE2\x9C\x94\033'
 | 
					CM='\xE2\x9C\x94\033'
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
while true; do
 | 
					while true; do
 | 
				
			||||||
    read -p "This will Update Dashy LXC. Proceed(y/n)?" yn
 | 
					    read -p "This will Update Dashy LXC. Proceed(y/n)?" yn
 | 
				
			||||||
    case $yn in
 | 
					    case $yn in
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,12 +16,12 @@ done
 | 
				
			||||||
clear
 | 
					clear
 | 
				
			||||||
 | 
					
 | 
				
			||||||
show_menu() {
 | 
					show_menu() {
 | 
				
			||||||
    normal=`echo "\033[m"`
 | 
					    normal=$(echo "\033[m")
 | 
				
			||||||
    safe=`echo "\033[32m"`
 | 
					    safe=$(echo "\033[32m")
 | 
				
			||||||
    menu=`echo "\033[36m"`
 | 
					    menu=$(echo "\033[36m")
 | 
				
			||||||
    number=`echo "\033[33m"`
 | 
					    number=$(echo "\033[33m")
 | 
				
			||||||
    bgred=`echo "\033[41m"`
 | 
					    bgred=$(echo "\033[41m")
 | 
				
			||||||
    fgred=`echo "\033[31m"`
 | 
					    fgred=$(echo "\033[31m")
 | 
				
			||||||
    proxmox-boot-tool kernel list
 | 
					    proxmox-boot-tool kernel list
 | 
				
			||||||
    echo -e "\nCurrent Kernel: ${menu}${KERNEL_ON}${normal}"
 | 
					    echo -e "\nCurrent Kernel: ${menu}${KERNEL_ON}${normal}"
 | 
				
			||||||
    printf "\n${menu}*********************************************${normal}\n"
 | 
					    printf "\n${menu}*********************************************${normal}\n"
 | 
				
			||||||
| 
						 | 
					@ -35,20 +35,20 @@ show_menu(){
 | 
				
			||||||
    read opt
 | 
					    read opt
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
option_picked() {
 | 
					option_picked() {
 | 
				
			||||||
    msgcolor=`echo "\033[01;31m"`
 | 
					    msgcolor=$(echo "\033[01;31m")
 | 
				
			||||||
    normal=`echo "\033[00;00m"`
 | 
					    normal=$(echo "\033[00;00m")
 | 
				
			||||||
    message=${@:-"${normal}Error: No message passed"}
 | 
					    message=${@:-"${normal}Error: No message passed"}
 | 
				
			||||||
    printf "${msgcolor}${message}${normal}\n"
 | 
					    printf "${msgcolor}${message}${normal}\n"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
clear
 | 
					clear
 | 
				
			||||||
show_menu
 | 
					show_menu
 | 
				
			||||||
while [ $opt != '' ]
 | 
					while [ $opt != '' ]; do
 | 
				
			||||||
    do
 | 
					 | 
				
			||||||
    if [ $opt = '' ]; then
 | 
					    if [ $opt = '' ]; then
 | 
				
			||||||
      exit;
 | 
					        exit
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
        case $opt in
 | 
					        case $opt in
 | 
				
			||||||
        1) while true; do
 | 
					        1)
 | 
				
			||||||
 | 
					            while true; do
 | 
				
			||||||
                read -p "Are you sure you want to Install Proxmox Edge Kernel & Reboot? Proceed(y/n)?" yn
 | 
					                read -p "Are you sure you want to Install Proxmox Edge Kernel & Reboot? Proceed(y/n)?" yn
 | 
				
			||||||
                case $yn in
 | 
					                case $yn in
 | 
				
			||||||
                [Yy]*) break ;;
 | 
					                [Yy]*) break ;;
 | 
				
			||||||
| 
						 | 
					@ -56,17 +56,18 @@ while [ $opt != '' ]
 | 
				
			||||||
                *) echo "Please answer yes or no." ;;
 | 
					                *) echo "Please answer yes or no." ;;
 | 
				
			||||||
                esac
 | 
					                esac
 | 
				
			||||||
            done
 | 
					            done
 | 
				
			||||||
           clear;
 | 
					            clear
 | 
				
			||||||
            option_picked "Installing Proxmox Edge Kernel & Rebooting";
 | 
					            option_picked "Installing Proxmox Edge Kernel & Rebooting"
 | 
				
			||||||
            apt-get install -y gnupg
 | 
					            apt-get install -y gnupg
 | 
				
			||||||
            curl -1sLf 'https://dl.cloudsmith.io/public/pve-edge/kernel/gpg.8EC01CCF309B98E7.key' | apt-key add -
 | 
					            curl -1sLf 'https://dl.cloudsmith.io/public/pve-edge/kernel/gpg.8EC01CCF309B98E7.key' | apt-key add -
 | 
				
			||||||
            echo "deb https://dl.cloudsmith.io/public/pve-edge/kernel/deb/debian bullseye main" >/etc/apt/sources.list.d/pve-edge-kernel.list
 | 
					            echo "deb https://dl.cloudsmith.io/public/pve-edge/kernel/deb/debian bullseye main" >/etc/apt/sources.list.d/pve-edge-kernel.list
 | 
				
			||||||
            apt-get -y update
 | 
					            apt-get -y update
 | 
				
			||||||
            apt-get -y install pve-kernel-5.19-edge
 | 
					            apt-get -y install pve-kernel-5.19-edge
 | 
				
			||||||
            reboot
 | 
					            reboot
 | 
				
			||||||
            break;
 | 
					            break
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
        2) while true; do
 | 
					        2)
 | 
				
			||||||
 | 
					            while true; do
 | 
				
			||||||
                read -p "Are you sure you want to Switch to Proxmox VE 7 ${PVE_KERNEL} Kernel & Reboot? Proceed(y/n)?" yn
 | 
					                read -p "Are you sure you want to Switch to Proxmox VE 7 ${PVE_KERNEL} Kernel & Reboot? Proceed(y/n)?" yn
 | 
				
			||||||
                case $yn in
 | 
					                case $yn in
 | 
				
			||||||
                [Yy]*) break ;;
 | 
					                [Yy]*) break ;;
 | 
				
			||||||
| 
						 | 
					@ -74,13 +75,14 @@ while [ $opt != '' ]
 | 
				
			||||||
                *) echo "Please answer yes or no." ;;
 | 
					                *) echo "Please answer yes or no." ;;
 | 
				
			||||||
                esac
 | 
					                esac
 | 
				
			||||||
            done
 | 
					            done
 | 
				
			||||||
           clear;
 | 
					            clear
 | 
				
			||||||
            option_picked "Switching to Proxmox VE 7 Kernel & Rebooting";
 | 
					            option_picked "Switching to Proxmox VE 7 Kernel & Rebooting"
 | 
				
			||||||
            proxmox-boot-tool kernel pin ${PVE_KERNEL}
 | 
					            proxmox-boot-tool kernel pin ${PVE_KERNEL}
 | 
				
			||||||
            reboot
 | 
					            reboot
 | 
				
			||||||
            break;
 | 
					            break
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
        3) while true; do
 | 
					        3)
 | 
				
			||||||
 | 
					            while true; do
 | 
				
			||||||
                read -p "Are you sure you want to Switch to Proxmox ${EDGE_KERNEL} Edge Kernel & Reboot? Proceed(y/n)?" yn
 | 
					                read -p "Are you sure you want to Switch to Proxmox ${EDGE_KERNEL} Edge Kernel & Reboot? Proceed(y/n)?" yn
 | 
				
			||||||
                case $yn in
 | 
					                case $yn in
 | 
				
			||||||
                [Yy]*) break ;;
 | 
					                [Yy]*) break ;;
 | 
				
			||||||
| 
						 | 
					@ -88,13 +90,14 @@ while [ $opt != '' ]
 | 
				
			||||||
                *) echo "Please answer yes or no." ;;
 | 
					                *) echo "Please answer yes or no." ;;
 | 
				
			||||||
                esac
 | 
					                esac
 | 
				
			||||||
            done
 | 
					            done
 | 
				
			||||||
           clear;
 | 
					            clear
 | 
				
			||||||
            option_picked "Switching to Proxmox Edge Kernel & Rebooting";
 | 
					            option_picked "Switching to Proxmox Edge Kernel & Rebooting"
 | 
				
			||||||
            proxmox-boot-tool kernel pin ${EDGE_KERNEL}
 | 
					            proxmox-boot-tool kernel pin ${EDGE_KERNEL}
 | 
				
			||||||
            reboot
 | 
					            reboot
 | 
				
			||||||
            break;
 | 
					            break
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
        4) while true; do
 | 
					        4)
 | 
				
			||||||
 | 
					            while true; do
 | 
				
			||||||
                read -p "Are you sure you want to Unpin the Current Kernel? Proceed(y/n)?" yn
 | 
					                read -p "Are you sure you want to Unpin the Current Kernel? Proceed(y/n)?" yn
 | 
				
			||||||
                case $yn in
 | 
					                case $yn in
 | 
				
			||||||
                [Yy]*) break ;;
 | 
					                [Yy]*) break ;;
 | 
				
			||||||
| 
						 | 
					@ -102,13 +105,14 @@ while [ $opt != '' ]
 | 
				
			||||||
                *) echo "Please answer yes or no." ;;
 | 
					                *) echo "Please answer yes or no." ;;
 | 
				
			||||||
                esac
 | 
					                esac
 | 
				
			||||||
            done
 | 
					            done
 | 
				
			||||||
           clear;
 | 
					            clear
 | 
				
			||||||
            option_picked "Unpinning Current Kernel";
 | 
					            option_picked "Unpinning Current Kernel"
 | 
				
			||||||
            proxmox-boot-tool kernel unpin
 | 
					            proxmox-boot-tool kernel unpin
 | 
				
			||||||
            clear;
 | 
					            clear
 | 
				
			||||||
            break;
 | 
					            break
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
        5) while true; do
 | 
					        5)
 | 
				
			||||||
 | 
					            while true; do
 | 
				
			||||||
                read -p "Are you sure you want to Remove Proxmox Edge Kernel & Reboot? Proceed(y/n)?" yn
 | 
					                read -p "Are you sure you want to Remove Proxmox Edge Kernel & Reboot? Proceed(y/n)?" yn
 | 
				
			||||||
                case $yn in
 | 
					                case $yn in
 | 
				
			||||||
                [Yy]*) break ;;
 | 
					                [Yy]*) break ;;
 | 
				
			||||||
| 
						 | 
					@ -116,21 +120,24 @@ while [ $opt != '' ]
 | 
				
			||||||
                *) echo "Please answer yes or no." ;;
 | 
					                *) echo "Please answer yes or no." ;;
 | 
				
			||||||
                esac
 | 
					                esac
 | 
				
			||||||
            done
 | 
					            done
 | 
				
			||||||
           clear;
 | 
					            clear
 | 
				
			||||||
            option_picked "Removing Proxmox Edge Kernel & Rebooting";
 | 
					            option_picked "Removing Proxmox Edge Kernel & Rebooting"
 | 
				
			||||||
            apt-get purge -y ${EDGE_KERNEL}
 | 
					            apt-get purge -y ${EDGE_KERNEL}
 | 
				
			||||||
            rm -rf /etc/apt/sources.list.d/pve-edge-kernel.list
 | 
					            rm -rf /etc/apt/sources.list.d/pve-edge-kernel.list
 | 
				
			||||||
            proxmox-boot-tool kernel unpin
 | 
					            proxmox-boot-tool kernel unpin
 | 
				
			||||||
            reboot
 | 
					            reboot
 | 
				
			||||||
            break;
 | 
					            break
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
        x)exit;
 | 
					        x)
 | 
				
			||||||
 | 
					            exit
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
        \n)exit;
 | 
					        \n)
 | 
				
			||||||
 | 
					            exit
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
        *)clear;
 | 
					        *)
 | 
				
			||||||
            option_picked "Please choose an option from the menu";
 | 
					            clear
 | 
				
			||||||
            show_menu;
 | 
					            option_picked "Please choose an option from the menu"
 | 
				
			||||||
 | 
					            show_menu
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
        esac
 | 
					        esac
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,12 +1,12 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
 | 
					LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,12 +1,12 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
IP=$(hostname -I | awk '{print $1}')
 | 
					IP=$(hostname -I | awk '{print $1}')
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -73,9 +73,9 @@ while [ -z "${CTID_TO:+x}" ]; do
 | 
				
			||||||
    "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
 | 
					    "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
for i in ${!CTID_MENU[@]}; do
 | 
					for i in ${!CTID_MENU[@]}; do
 | 
				
			||||||
  [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && \
 | 
					  [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
 | 
				
			||||||
    CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
					    CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
				
			||||||
  [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && \
 | 
					  [ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
 | 
				
			||||||
    CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
					    CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
whiptail --defaultno --title "$TITLE" --yesno \
 | 
					whiptail --defaultno --title "$TITLE" --yesno \
 | 
				
			||||||
| 
						 | 
					@ -90,13 +90,13 @@ fi
 | 
				
			||||||
msg "Mounting Container Disks..."
 | 
					msg "Mounting Container Disks..."
 | 
				
			||||||
DOCKER_PATH=/var/lib/docker/volumes/hass_config/
 | 
					DOCKER_PATH=/var/lib/docker/volumes/hass_config/
 | 
				
			||||||
PODMAN_PATH=/var/lib/containers/storage/volumes/hass_config/
 | 
					PODMAN_PATH=/var/lib/containers/storage/volumes/hass_config/
 | 
				
			||||||
CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || \
 | 
					CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") ||
 | 
				
			||||||
  die "There was a problem mounting the root disk of LXC '${CTID_FROM}'."
 | 
					  die "There was a problem mounting the root disk of LXC '${CTID_FROM}'."
 | 
				
			||||||
[ -d "${CTID_FROM_PATH}${DOCKER_PATH}" ] || \
 | 
					[ -d "${CTID_FROM_PATH}${DOCKER_PATH}" ] ||
 | 
				
			||||||
  die "Home Assistant directories in '$CTID_FROM' not found."
 | 
					  die "Home Assistant directories in '$CTID_FROM' not found."
 | 
				
			||||||
CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || \
 | 
					CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") ||
 | 
				
			||||||
  die "There was a problem mounting the root disk of LXC '${CTID_TO}'."
 | 
					  die "There was a problem mounting the root disk of LXC '${CTID_TO}'."
 | 
				
			||||||
[ -d "${CTID_TO_PATH}${PODMAN_PATH}" ] || \
 | 
					[ -d "${CTID_TO_PATH}${PODMAN_PATH}" ] ||
 | 
				
			||||||
  die "Home Assistant directories in '$CTID_TO' not found."
 | 
					  die "Home Assistant directories in '$CTID_TO' not found."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
rm -rf ${CTID_TO_PATH}${PODMAN_PATH}
 | 
					rm -rf ${CTID_TO_PATH}${PODMAN_PATH}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -73,9 +73,9 @@ while [ -z "${CTID_TO:+x}" ]; do
 | 
				
			||||||
    "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
 | 
					    "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
for i in ${!CTID_MENU[@]}; do
 | 
					for i in ${!CTID_MENU[@]}; do
 | 
				
			||||||
  [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && \
 | 
					  [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
 | 
				
			||||||
    CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
					    CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
				
			||||||
  [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && \
 | 
					  [ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
 | 
				
			||||||
    CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
					    CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
whiptail --defaultno --title "$TITLE" --yesno \
 | 
					whiptail --defaultno --title "$TITLE" --yesno \
 | 
				
			||||||
| 
						 | 
					@ -89,13 +89,13 @@ if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
msg "Mounting Container Disks..."
 | 
					msg "Mounting Container Disks..."
 | 
				
			||||||
DOCKER_PATH=/var/lib/docker/volumes/hass_config/
 | 
					DOCKER_PATH=/var/lib/docker/volumes/hass_config/
 | 
				
			||||||
CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || \
 | 
					CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") ||
 | 
				
			||||||
  die "There was a problem mounting the root disk of LXC '${CTID_FROM}'."
 | 
					  die "There was a problem mounting the root disk of LXC '${CTID_FROM}'."
 | 
				
			||||||
[ -d "${CTID_FROM_PATH}${DOCKER_PATH}" ] || \
 | 
					[ -d "${CTID_FROM_PATH}${DOCKER_PATH}" ] ||
 | 
				
			||||||
  die "Home Assistant directories in '$CTID_FROM' not found."
 | 
					  die "Home Assistant directories in '$CTID_FROM' not found."
 | 
				
			||||||
CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || \
 | 
					CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") ||
 | 
				
			||||||
  die "There was a problem mounting the root disk of LXC '${CTID_TO}'."
 | 
					  die "There was a problem mounting the root disk of LXC '${CTID_TO}'."
 | 
				
			||||||
[ -d "${CTID_TO_PATH}${DOCKER_PATH}" ] || \
 | 
					[ -d "${CTID_TO_PATH}${DOCKER_PATH}" ] ||
 | 
				
			||||||
  die "Home Assistant directories in '$CTID_TO' not found."
 | 
					  die "Home Assistant directories in '$CTID_TO' not found."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
rm -rf ${CTID_TO_PATH}${DOCKER_PATH}
 | 
					rm -rf ${CTID_TO_PATH}${DOCKER_PATH}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -70,9 +70,9 @@ while [ -z "${CTID_TO:+x}" ]; do
 | 
				
			||||||
    "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
 | 
					    "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
for i in ${!CTID_MENU[@]}; do
 | 
					for i in ${!CTID_MENU[@]}; do
 | 
				
			||||||
  [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && \
 | 
					  [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
 | 
				
			||||||
    CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
					    CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
				
			||||||
  [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && \
 | 
					  [ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
 | 
				
			||||||
    CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
					    CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
whiptail --defaultno --title "$TITLE" --yesno \
 | 
					whiptail --defaultno --title "$TITLE" --yesno \
 | 
				
			||||||
| 
						 | 
					@ -87,13 +87,13 @@ fi
 | 
				
			||||||
msg "Mounting Container Disks..."
 | 
					msg "Mounting Container Disks..."
 | 
				
			||||||
DOCKER_PATH=/var/lib/docker/volumes/hass_config/_data
 | 
					DOCKER_PATH=/var/lib/docker/volumes/hass_config/_data
 | 
				
			||||||
CORE_PATH=/root/.homeassistant
 | 
					CORE_PATH=/root/.homeassistant
 | 
				
			||||||
CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || \
 | 
					CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") ||
 | 
				
			||||||
  die "There was a problem mounting the root disk of LXC '${CTID_FROM}'."
 | 
					  die "There was a problem mounting the root disk of LXC '${CTID_FROM}'."
 | 
				
			||||||
[ -d "${CTID_FROM_PATH}${DOCKER_PATH}" ] || \
 | 
					[ -d "${CTID_FROM_PATH}${DOCKER_PATH}" ] ||
 | 
				
			||||||
  die "Home Assistant directories in '$CTID_FROM' not found."
 | 
					  die "Home Assistant directories in '$CTID_FROM' not found."
 | 
				
			||||||
CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || \
 | 
					CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") ||
 | 
				
			||||||
  die "There was a problem mounting the root disk of LXC '${CTID_TO}'."
 | 
					  die "There was a problem mounting the root disk of LXC '${CTID_TO}'."
 | 
				
			||||||
[ -d "${CTID_TO_PATH}${CORE_PATH}" ] || \
 | 
					[ -d "${CTID_TO_PATH}${CORE_PATH}" ] ||
 | 
				
			||||||
  die "Home Assistant directories in '$CTID_TO' not found."
 | 
					  die "Home Assistant directories in '$CTID_TO' not found."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
msg "Copying Data..."
 | 
					msg "Copying Data..."
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -70,9 +70,9 @@ while [ -z "${CTID_TO:+x}" ]; do
 | 
				
			||||||
    "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
 | 
					    "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
for i in ${!CTID_MENU[@]}; do
 | 
					for i in ${!CTID_MENU[@]}; do
 | 
				
			||||||
  [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && \
 | 
					  [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
 | 
				
			||||||
    CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
					    CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
				
			||||||
  [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && \
 | 
					  [ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
 | 
				
			||||||
    CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
					    CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
whiptail --defaultno --title "$TITLE" --yesno \
 | 
					whiptail --defaultno --title "$TITLE" --yesno \
 | 
				
			||||||
| 
						 | 
					@ -87,13 +87,13 @@ fi
 | 
				
			||||||
msg "Mounting Container Disks..."
 | 
					msg "Mounting Container Disks..."
 | 
				
			||||||
DOCKER_PATH=/var/lib/docker/volumes/hass_config/_data
 | 
					DOCKER_PATH=/var/lib/docker/volumes/hass_config/_data
 | 
				
			||||||
CORE_PATH=/root/.homeassistant
 | 
					CORE_PATH=/root/.homeassistant
 | 
				
			||||||
CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || \
 | 
					CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") ||
 | 
				
			||||||
  die "There was a problem mounting the root disk of LXC '${CTID_FROM}'."
 | 
					  die "There was a problem mounting the root disk of LXC '${CTID_FROM}'."
 | 
				
			||||||
[ -d "${CTID_FROM_PATH}${CORE_PATH}" ] || \
 | 
					[ -d "${CTID_FROM_PATH}${CORE_PATH}" ] ||
 | 
				
			||||||
  die "Home Assistant directories in '$CTID_FROM' not found."
 | 
					  die "Home Assistant directories in '$CTID_FROM' not found."
 | 
				
			||||||
CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || \
 | 
					CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") ||
 | 
				
			||||||
  die "There was a problem mounting the root disk of LXC '${CTID_TO}'."
 | 
					  die "There was a problem mounting the root disk of LXC '${CTID_TO}'."
 | 
				
			||||||
[ -d "${CTID_TO_PATH}${DOCKER_PATH}" ] || \
 | 
					[ -d "${CTID_TO_PATH}${DOCKER_PATH}" ] ||
 | 
				
			||||||
  die "Home Assistant directories in '$CTID_TO' not found."
 | 
					  die "Home Assistant directories in '$CTID_TO' not found."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
msg "Copying Data..."
 | 
					msg "Copying Data..."
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -66,9 +66,9 @@ while [ -z "${CTID_TO:+x}" ]; do
 | 
				
			||||||
    "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
 | 
					    "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
for i in ${!CTID_MENU[@]}; do
 | 
					for i in ${!CTID_MENU[@]}; do
 | 
				
			||||||
  [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && \
 | 
					  [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
 | 
				
			||||||
    CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
					    CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
				
			||||||
  [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && \
 | 
					  [ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
 | 
				
			||||||
    CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
					    CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
whiptail --defaultno --title "$TITLE" --yesno \
 | 
					whiptail --defaultno --title "$TITLE" --yesno \
 | 
				
			||||||
| 
						 | 
					@ -83,13 +83,13 @@ fi
 | 
				
			||||||
msg "Mounting Container Disks..."
 | 
					msg "Mounting Container Disks..."
 | 
				
			||||||
DOCKER_PATH=/var/lib/docker/volumes/hass_config/_data
 | 
					DOCKER_PATH=/var/lib/docker/volumes/hass_config/_data
 | 
				
			||||||
CORE_PATH=/root/.homeassistant
 | 
					CORE_PATH=/root/.homeassistant
 | 
				
			||||||
CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || \
 | 
					CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") ||
 | 
				
			||||||
  die "There was a problem mounting the root disk of LXC '${CTID_FROM}'."
 | 
					  die "There was a problem mounting the root disk of LXC '${CTID_FROM}'."
 | 
				
			||||||
[ -d "${CTID_FROM_PATH}${CORE_PATH}" ] || \
 | 
					[ -d "${CTID_FROM_PATH}${CORE_PATH}" ] ||
 | 
				
			||||||
  die "Home Assistant directories in '$CTID_FROM' not found."
 | 
					  die "Home Assistant directories in '$CTID_FROM' not found."
 | 
				
			||||||
CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || \
 | 
					CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") ||
 | 
				
			||||||
  die "There was a problem mounting the root disk of LXC '${CTID_TO}'."
 | 
					  die "There was a problem mounting the root disk of LXC '${CTID_TO}'."
 | 
				
			||||||
[ -d "${CTID_TO_PATH}${CORE_PATH}" ] || \
 | 
					[ -d "${CTID_TO_PATH}${CORE_PATH}" ] ||
 | 
				
			||||||
  die "Home Assistant directories in '$CTID_TO' not found."
 | 
					  die "Home Assistant directories in '$CTID_TO' not found."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
msg "Copying Data..."
 | 
					msg "Copying Data..."
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +1,11 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
set -e
 | 
					set -e
 | 
				
			||||||
PP=`echo "\e[1;35m"`
 | 
					PP=$(echo "\e[1;35m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
CM='\xE2\x9C\x94\033'
 | 
					CM='\xE2\x9C\x94\033'
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
while true; do
 | 
					while true; do
 | 
				
			||||||
  read -p "This will Update Heimdall Dashboard. Proceed(y/n)?" yn
 | 
					  read -p "This will Update Heimdall Dashboard. Proceed(y/n)?" yn
 | 
				
			||||||
  case $yn in
 | 
					  case $yn in
 | 
				
			||||||
| 
						 | 
					@ -56,9 +56,9 @@ RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releas
 | 
				
			||||||
echo -en "${GN} Updating Heimdall Dashboard to ${RELEASE}... "
 | 
					echo -en "${GN} Updating Heimdall Dashboard to ${RELEASE}... "
 | 
				
			||||||
curl --silent -o ${RELEASE}.tar.gz -L "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" &>/dev/null
 | 
					curl --silent -o ${RELEASE}.tar.gz -L "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" &>/dev/null
 | 
				
			||||||
tar xvzf ${RELEASE}.tar.gz &>/dev/null
 | 
					tar xvzf ${RELEASE}.tar.gz &>/dev/null
 | 
				
			||||||
VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest \
 | 
					VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest |
 | 
				
			||||||
| grep "tag_name" \
 | 
					  grep "tag_name" |
 | 
				
			||||||
| awk '{print substr($2, 3, length($2)-4) }')
 | 
					  awk '{print substr($2, 3, length($2)-4) }')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ ! -d "/opt/Heimdall" ]; then
 | 
					if [ ! -d "/opt/Heimdall" ]; then
 | 
				
			||||||
  mv Heimdall-${VER} /opt/Heimdall
 | 
					  mv Heimdall-${VER} /opt/Heimdall
 | 
				
			||||||
| 
						 | 
					@ -116,4 +116,3 @@ sleep 2
 | 
				
			||||||
echo -e "${CM}${CL} \r"
 | 
					echo -e "${CM}${CL} \r"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo -en "${GN} Finished! ${CL}\n"
 | 
					echo -en "${GN} Finished! ${CL}\n"
 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +1,11 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,13 +1,13 @@
 | 
				
			||||||
#!/usr/bin/env bash -ex
 | 
					#!/usr/bin/env bash -ex
 | 
				
			||||||
set -euo pipefail
 | 
					set -euo pipefail
 | 
				
			||||||
shopt -s inherit_errexit nullglob
 | 
					shopt -s inherit_errexit nullglob
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -82,8 +82,7 @@ function kernel_info() {
 | 
				
			||||||
function kernel_clean() {
 | 
					function kernel_clean() {
 | 
				
			||||||
    kernels=$(dpkg --list | grep 'kernel-.*-pve' | awk '{print $2}' | sort -V)
 | 
					    kernels=$(dpkg --list | grep 'kernel-.*-pve' | awk '{print $2}' | sort -V)
 | 
				
			||||||
    remove_kernels=""
 | 
					    remove_kernels=""
 | 
				
			||||||
    for kernel in $kernels
 | 
					    for kernel in $kernels; do
 | 
				
			||||||
      do
 | 
					 | 
				
			||||||
        if [ "$(echo $kernel | grep $current_kernel)" ]; then
 | 
					        if [ "$(echo $kernel | grep $current_kernel)" ]; then
 | 
				
			||||||
            break
 | 
					            break
 | 
				
			||||||
        else
 | 
					        else
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,13 +1,13 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest \
 | 
					RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest |
 | 
				
			||||||
| grep "tag_name" \
 | 
					    grep "tag_name" |
 | 
				
			||||||
| awk '{print substr($2, 3, length($2)-4) }')
 | 
					    awk '{print substr($2, 3, length($2)-4) }')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
CM='\xE2\x9C\x94\033'
 | 
					CM='\xE2\x9C\x94\033'
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
function update_info {
 | 
					function update_info {
 | 
				
			||||||
    cat <<"EOF"
 | 
					    cat <<"EOF"
 | 
				
			||||||
    _   __            _     __                        
 | 
					    _   __            _     __                        
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +1,11 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -68,8 +68,7 @@ msg_ok "Updated ${APP}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -p "${APP} LXC needs to reboot to apply the update. Reboot now? " -n 1 -r
 | 
					read -p "${APP} LXC needs to reboot to apply the update. Reboot now? " -n 1 -r
 | 
				
			||||||
echo
 | 
					echo
 | 
				
			||||||
if [[ $REPLY =~ ^[Yy]$ ]]
 | 
					if [[ $REPLY =~ ^[Yy]$ ]]; then
 | 
				
			||||||
then
 | 
					 | 
				
			||||||
    reboot=yes
 | 
					    reboot=yes
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
    reboot=no
 | 
					    reboot=no
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,12 +2,12 @@
 | 
				
			||||||
# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/node-red-themes.sh)"
 | 
					# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/node-red-themes.sh)"
 | 
				
			||||||
set -o errexit
 | 
					set -o errexit
 | 
				
			||||||
show_menu() {
 | 
					show_menu() {
 | 
				
			||||||
    YW=`echo "\033[33m"`
 | 
					    YW=$(echo "\033[33m")
 | 
				
			||||||
    RD=`echo "\033[01;31m"`
 | 
					    RD=$(echo "\033[01;31m")
 | 
				
			||||||
    BL=`echo "\033[36m"`
 | 
					    BL=$(echo "\033[36m")
 | 
				
			||||||
    CM='\xE2\x9C\x94\033'
 | 
					    CM='\xE2\x9C\x94\033'
 | 
				
			||||||
    GN=`echo "\033[1;92m"`
 | 
					    GN=$(echo "\033[1;92m")
 | 
				
			||||||
    CL=`echo "\033[m"`
 | 
					    CL=$(echo "\033[m")
 | 
				
			||||||
    echo -e "${RD} Backup your Node-Red flows before running this script!!${CL} \n "
 | 
					    echo -e "${RD} Backup your Node-Red flows before running this script!!${CL} \n "
 | 
				
			||||||
    while true; do
 | 
					    while true; do
 | 
				
			||||||
        read -p "This will Install Node-Red Themes. Proceed(y/n)?" yn
 | 
					        read -p "This will Install Node-Red Themes. Proceed(y/n)?" yn
 | 
				
			||||||
| 
						 | 
					@ -33,61 +33,70 @@ echo -e "${RD} Backup your Node-Red flows before installing any theme!!${CL} \n
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
option_picked() {
 | 
					option_picked() {
 | 
				
			||||||
    msgcolor=`echo "\033[01;31m"`
 | 
					    msgcolor=$(echo "\033[01;31m")
 | 
				
			||||||
    normal=`echo "\033[00;00m"`
 | 
					    normal=$(echo "\033[00;00m")
 | 
				
			||||||
    message=${@:-"${CL}Error: No message passed"}
 | 
					    message=${@:-"${CL}Error: No message passed"}
 | 
				
			||||||
    printf "${RD}${message}${CL}\n"
 | 
					    printf "${RD}${message}${CL}\n"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
clear
 | 
					clear
 | 
				
			||||||
show_menu
 | 
					show_menu
 | 
				
			||||||
while [ "$opt" != " " ]
 | 
					while [ "$opt" != " " ]; do
 | 
				
			||||||
    do
 | 
					 | 
				
			||||||
    case $opt in
 | 
					    case $opt in
 | 
				
			||||||
        1) clear;
 | 
					    1)
 | 
				
			||||||
            option_picked "Installing Default Theme";
 | 
					        clear
 | 
				
			||||||
 | 
					        option_picked "Installing Default Theme"
 | 
				
			||||||
        THEME=
 | 
					        THEME=
 | 
				
			||||||
        JS=//
 | 
					        JS=//
 | 
				
			||||||
            break;
 | 
					        break
 | 
				
			||||||
        ;;
 | 
					        ;;
 | 
				
			||||||
        2) clear;
 | 
					    2)
 | 
				
			||||||
            option_picked "Installing Dark Theme";
 | 
					        clear
 | 
				
			||||||
 | 
					        option_picked "Installing Dark Theme"
 | 
				
			||||||
        THEME=dark
 | 
					        THEME=dark
 | 
				
			||||||
            break;
 | 
					        break
 | 
				
			||||||
        ;;
 | 
					        ;;
 | 
				
			||||||
        3) clear;
 | 
					    3)
 | 
				
			||||||
            option_picked "Installing Dracula Theme";
 | 
					        clear
 | 
				
			||||||
 | 
					        option_picked "Installing Dracula Theme"
 | 
				
			||||||
        THEME=dracula
 | 
					        THEME=dracula
 | 
				
			||||||
            break;
 | 
					        break
 | 
				
			||||||
        ;;
 | 
					        ;;
 | 
				
			||||||
        4) clear;
 | 
					    4)
 | 
				
			||||||
            option_picked "Installing Midnight-Red Theme";
 | 
					        clear
 | 
				
			||||||
 | 
					        option_picked "Installing Midnight-Red Theme"
 | 
				
			||||||
        THEME=midnight-red
 | 
					        THEME=midnight-red
 | 
				
			||||||
            break;
 | 
					        break
 | 
				
			||||||
        ;;
 | 
					        ;;
 | 
				
			||||||
        5) clear;
 | 
					    5)
 | 
				
			||||||
            option_picked "Installing Oled Theme";
 | 
					        clear
 | 
				
			||||||
 | 
					        option_picked "Installing Oled Theme"
 | 
				
			||||||
        THEME=oled
 | 
					        THEME=oled
 | 
				
			||||||
            break;
 | 
					        break
 | 
				
			||||||
        ;;
 | 
					        ;;
 | 
				
			||||||
        6) clear;
 | 
					    6)
 | 
				
			||||||
            option_picked "Installing Solarized-Dark Theme";
 | 
					        clear
 | 
				
			||||||
 | 
					        option_picked "Installing Solarized-Dark Theme"
 | 
				
			||||||
        THEME=solarized-dark
 | 
					        THEME=solarized-dark
 | 
				
			||||||
            break;
 | 
					        break
 | 
				
			||||||
        ;;
 | 
					        ;;
 | 
				
			||||||
        7) clear;
 | 
					    7)
 | 
				
			||||||
            option_picked "Installing Solarized-Light Theme";
 | 
					        clear
 | 
				
			||||||
 | 
					        option_picked "Installing Solarized-Light Theme"
 | 
				
			||||||
        THEME=solarized-light
 | 
					        THEME=solarized-light
 | 
				
			||||||
            break;
 | 
					        break
 | 
				
			||||||
        ;;
 | 
					        ;;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        x)exit;
 | 
					    x)
 | 
				
			||||||
 | 
					        exit
 | 
				
			||||||
        ;;
 | 
					        ;;
 | 
				
			||||||
        \n)exit;
 | 
					    \n)
 | 
				
			||||||
 | 
					        exit
 | 
				
			||||||
        ;;
 | 
					        ;;
 | 
				
			||||||
        *)clear;
 | 
					    *)
 | 
				
			||||||
            option_picked "Please choose a theme from the menu";
 | 
					        clear
 | 
				
			||||||
            show_menu;
 | 
					        option_picked "Please choose a theme from the menu"
 | 
				
			||||||
 | 
					        show_menu
 | 
				
			||||||
        ;;
 | 
					        ;;
 | 
				
			||||||
    esac
 | 
					    esac
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,13 +1,13 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest \
 | 
					RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest |
 | 
				
			||||||
| grep "tag_name" \
 | 
					  grep "tag_name" |
 | 
				
			||||||
| awk '{print substr($2, 3, length($2)-4) }') \
 | 
					  awk '{print substr($2, 3, length($2)-4) }')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
CM='\xE2\x9C\x94\033'
 | 
					CM='\xE2\x9C\x94\033'
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function update_info {
 | 
					function update_info {
 | 
				
			||||||
  echo -e "${RD}
 | 
					  echo -e "${RD}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +1,11 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
clear
 | 
					clear
 | 
				
			||||||
RELEASE=$(curl -s https://api.github.com/repos/paperless-ngx/paperless-ngx/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
 | 
					RELEASE=$(curl -s https://api.github.com/repos/paperless-ngx/paperless-ngx/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
RETRY_NUM=10
 | 
					RETRY_NUM=10
 | 
				
			||||||
RETRY_EVERY=3
 | 
					RETRY_EVERY=3
 | 
				
			||||||
NUM=$RETRY_NUM
 | 
					NUM=$RETRY_NUM
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,16 +1,16 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
set -e
 | 
					set -e
 | 
				
			||||||
RELEASE=$(curl -s https://api.github.com/repos/photoprism/photoprism/releases/latest \
 | 
					RELEASE=$(curl -s https://api.github.com/repos/photoprism/photoprism/releases/latest |
 | 
				
			||||||
| grep "tag_name" \
 | 
					    grep "tag_name" |
 | 
				
			||||||
| awk '{print substr($2, 2, length($2)-4) }') \
 | 
					    awk '{print substr($2, 2, length($2)-4) }')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
CM='\xE2\x9C\x94\033'
 | 
					CM='\xE2\x9C\x94\033'
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
PP=`echo "\e[1;35m"`
 | 
					PP=$(echo "\e[1;35m")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
while true; do
 | 
					while true; do
 | 
				
			||||||
    read -p "Update PhotoPrism LXC. Proceed(y/n)?" yn
 | 
					    read -p "Update PhotoPrism LXC. Proceed(y/n)?" yn
 | 
				
			||||||
| 
						 | 
					@ -47,29 +47,33 @@ option_picked(){
 | 
				
			||||||
    printf " ${YW}${message1}${CL}\n"
 | 
					    printf " ${YW}${message1}${CL}\n"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
show_menu
 | 
					show_menu
 | 
				
			||||||
while [ "$opt" != " " ]
 | 
					while [ "$opt" != " " ]; do
 | 
				
			||||||
    do
 | 
					 | 
				
			||||||
    case $opt in
 | 
					    case $opt in
 | 
				
			||||||
        1) clear;
 | 
					    1)
 | 
				
			||||||
            header_info;
 | 
					        clear
 | 
				
			||||||
            option_picked "Using Release Branch";
 | 
					        header_info
 | 
				
			||||||
 | 
					        option_picked "Using Release Branch"
 | 
				
			||||||
        BR="release"
 | 
					        BR="release"
 | 
				
			||||||
            break;
 | 
					        break
 | 
				
			||||||
        ;;
 | 
					        ;;
 | 
				
			||||||
        2) clear;
 | 
					    2)
 | 
				
			||||||
            header_info;
 | 
					        clear
 | 
				
			||||||
            option_picked "Using Develop Branch";
 | 
					        header_info
 | 
				
			||||||
 | 
					        option_picked "Using Develop Branch"
 | 
				
			||||||
        BR="develop"
 | 
					        BR="develop"
 | 
				
			||||||
            break;
 | 
					        break
 | 
				
			||||||
        ;;
 | 
					        ;;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        x)exit;
 | 
					    x)
 | 
				
			||||||
 | 
					        exit
 | 
				
			||||||
        ;;
 | 
					        ;;
 | 
				
			||||||
        \n)exit;
 | 
					    \n)
 | 
				
			||||||
 | 
					        exit
 | 
				
			||||||
        ;;
 | 
					        ;;
 | 
				
			||||||
        *)clear;
 | 
					    *)
 | 
				
			||||||
            option_picked "Please choose a Install Branch from the menu";
 | 
					        clear
 | 
				
			||||||
            show_menu;
 | 
					        option_picked "Please choose a Install Branch from the menu"
 | 
				
			||||||
 | 
					        show_menu
 | 
				
			||||||
        ;;
 | 
					        ;;
 | 
				
			||||||
    esac
 | 
					    esac
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
| 
						 | 
					@ -100,5 +104,3 @@ sudo systemctl start photoprism
 | 
				
			||||||
echo -e "${CM}${CL} \n"
 | 
					echo -e "${CM}${CL} \n"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo -e "${GN} Finished ${CL} \n "
 | 
					echo -e "${GN} Finished ${CL} \n "
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -73,9 +73,9 @@ while [ -z "${CTID_TO:+x}" ]; do
 | 
				
			||||||
    "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
 | 
					    "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
for i in ${!CTID_MENU[@]}; do
 | 
					for i in ${!CTID_MENU[@]}; do
 | 
				
			||||||
  [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && \
 | 
					  [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
 | 
				
			||||||
    CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
					    CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
				
			||||||
  [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && \
 | 
					  [ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
 | 
				
			||||||
    CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
					    CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
whiptail --defaultno --title "$TITLE" --yesno \
 | 
					whiptail --defaultno --title "$TITLE" --yesno \
 | 
				
			||||||
| 
						 | 
					@ -89,13 +89,13 @@ if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
msg "Mounting Container Disks..."
 | 
					msg "Mounting Container Disks..."
 | 
				
			||||||
DATA_PATH=/var/lib/plexmediaserver/Library/
 | 
					DATA_PATH=/var/lib/plexmediaserver/Library/
 | 
				
			||||||
CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || \
 | 
					CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") ||
 | 
				
			||||||
  die "There was a problem mounting the root disk of LXC '${CTID_FROM}'."
 | 
					  die "There was a problem mounting the root disk of LXC '${CTID_FROM}'."
 | 
				
			||||||
[ -d "${CTID_FROM_PATH}${DATA_PATH}" ] || \
 | 
					[ -d "${CTID_FROM_PATH}${DATA_PATH}" ] ||
 | 
				
			||||||
  die "Plex Media Server directories in '$CTID_FROM' not found."
 | 
					  die "Plex Media Server directories in '$CTID_FROM' not found."
 | 
				
			||||||
CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || \
 | 
					CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") ||
 | 
				
			||||||
  die "There was a problem mounting the root disk of LXC '${CTID_TO}'."
 | 
					  die "There was a problem mounting the root disk of LXC '${CTID_TO}'."
 | 
				
			||||||
[ -d "${CTID_TO_PATH}${DATA_PATH}" ] || \
 | 
					[ -d "${CTID_TO_PATH}${DATA_PATH}" ] ||
 | 
				
			||||||
  die "Plex Media Server directories in '$CTID_TO' not found."
 | 
					  die "Plex Media Server directories in '$CTID_TO' not found."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#rm -rf ${CTID_TO_PATH}${DATA_PATH}
 | 
					#rm -rf ${CTID_TO_PATH}${DATA_PATH}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -73,9 +73,9 @@ while [ -z "${CTID_TO:+x}" ]; do
 | 
				
			||||||
    "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
 | 
					    "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
for i in ${!CTID_MENU[@]}; do
 | 
					for i in ${!CTID_MENU[@]}; do
 | 
				
			||||||
  [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && \
 | 
					  [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
 | 
				
			||||||
    CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
					    CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
				
			||||||
  [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && \
 | 
					  [ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
 | 
				
			||||||
    CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
					    CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
whiptail --defaultno --title "$TITLE" --yesno \
 | 
					whiptail --defaultno --title "$TITLE" --yesno \
 | 
				
			||||||
| 
						 | 
					@ -90,13 +90,13 @@ fi
 | 
				
			||||||
msg "Mounting Container Disks..."
 | 
					msg "Mounting Container Disks..."
 | 
				
			||||||
DOCKER_PATH=/var/lib/docker/volumes/hass_config/
 | 
					DOCKER_PATH=/var/lib/docker/volumes/hass_config/
 | 
				
			||||||
PODMAN_PATH=/var/lib/containers/storage/volumes/hass_config/
 | 
					PODMAN_PATH=/var/lib/containers/storage/volumes/hass_config/
 | 
				
			||||||
CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || \
 | 
					CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") ||
 | 
				
			||||||
  die "There was a problem mounting the root disk of LXC '${CTID_FROM}'."
 | 
					  die "There was a problem mounting the root disk of LXC '${CTID_FROM}'."
 | 
				
			||||||
[ -d "${CTID_FROM_PATH}${PODMAN_PATH}" ] || \
 | 
					[ -d "${CTID_FROM_PATH}${PODMAN_PATH}" ] ||
 | 
				
			||||||
  die "Home Assistant directories in '$CTID_FROM' not found."
 | 
					  die "Home Assistant directories in '$CTID_FROM' not found."
 | 
				
			||||||
CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || \
 | 
					CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") ||
 | 
				
			||||||
  die "There was a problem mounting the root disk of LXC '${CTID_TO}'."
 | 
					  die "There was a problem mounting the root disk of LXC '${CTID_TO}'."
 | 
				
			||||||
[ -d "${CTID_TO_PATH}${DOCKER_PATH}" ] || \
 | 
					[ -d "${CTID_TO_PATH}${DOCKER_PATH}" ] ||
 | 
				
			||||||
  die "Home Assistant directories in '$CTID_TO' not found."
 | 
					  die "Home Assistant directories in '$CTID_TO' not found."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
rm -rf ${CTID_TO_PATH}${DOCKER_PATH}
 | 
					rm -rf ${CTID_TO_PATH}${DOCKER_PATH}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,13 +1,13 @@
 | 
				
			||||||
#!/usr/bin/env bash -ex
 | 
					#!/usr/bin/env bash -ex
 | 
				
			||||||
set -euo pipefail
 | 
					set -euo pipefail
 | 
				
			||||||
shopt -s inherit_errexit nullglob
 | 
					shopt -s inherit_errexit nullglob
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -52,8 +52,7 @@ function msg_ok() {
 | 
				
			||||||
clear
 | 
					clear
 | 
				
			||||||
header_info
 | 
					header_info
 | 
				
			||||||
read -r -p "Disable Enterprise Repository? <y/N> " prompt
 | 
					read -r -p "Disable Enterprise Repository? <y/N> " prompt
 | 
				
			||||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
 | 
					if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
 | 
				
			||||||
then
 | 
					 | 
				
			||||||
    msg_info "Disabling Enterprise Repository"
 | 
					    msg_info "Disabling Enterprise Repository"
 | 
				
			||||||
    sleep 2
 | 
					    sleep 2
 | 
				
			||||||
    sed -i "s/^deb/#deb/g" /etc/apt/sources.list.d/pbs-enterprise.list
 | 
					    sed -i "s/^deb/#deb/g" /etc/apt/sources.list.d/pbs-enterprise.list
 | 
				
			||||||
| 
						 | 
					@ -61,8 +60,7 @@ msg_ok "Disabled Enterprise Repository"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Add/Correct PBS Sources (sources.list)? <y/N> " prompt
 | 
					read -r -p "Add/Correct PBS Sources (sources.list)? <y/N> " prompt
 | 
				
			||||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
 | 
					if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
 | 
				
			||||||
then
 | 
					 | 
				
			||||||
    msg_info "Adding or Correcting PBS Sources"
 | 
					    msg_info "Adding or Correcting PBS Sources"
 | 
				
			||||||
    cat <<EOF >/etc/apt/sources.list
 | 
					    cat <<EOF >/etc/apt/sources.list
 | 
				
			||||||
deb http://ftp.debian.org/debian bullseye main contrib
 | 
					deb http://ftp.debian.org/debian bullseye main contrib
 | 
				
			||||||
| 
						 | 
					@ -74,8 +72,7 @@ msg_ok "Added or Corrected PBS Sources"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Enable No-Subscription Repository? <y/N> " prompt
 | 
					read -r -p "Enable No-Subscription Repository? <y/N> " prompt
 | 
				
			||||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
 | 
					if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
 | 
				
			||||||
then
 | 
					 | 
				
			||||||
    msg_info "Enabling No-Subscription Repository"
 | 
					    msg_info "Enabling No-Subscription Repository"
 | 
				
			||||||
    cat <<EOF >>/etc/apt/sources.list
 | 
					    cat <<EOF >>/etc/apt/sources.list
 | 
				
			||||||
deb http://download.proxmox.com/debian/pbs bullseye pbs-no-subscription
 | 
					deb http://download.proxmox.com/debian/pbs bullseye pbs-no-subscription
 | 
				
			||||||
| 
						 | 
					@ -85,8 +82,7 @@ msg_ok "Enabled No-Subscription Repository"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Add (Disabled) Beta/Test Repository? <y/N> " prompt
 | 
					read -r -p "Add (Disabled) Beta/Test Repository? <y/N> " prompt
 | 
				
			||||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
 | 
					if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
 | 
				
			||||||
then
 | 
					 | 
				
			||||||
    msg_info "Adding Beta/Test Repository and set disabled"
 | 
					    msg_info "Adding Beta/Test Repository and set disabled"
 | 
				
			||||||
    cat <<EOF >>/etc/apt/sources.list
 | 
					    cat <<EOF >>/etc/apt/sources.list
 | 
				
			||||||
# deb http://download.proxmox.com/debian/pbs bullseye pbstest
 | 
					# deb http://download.proxmox.com/debian/pbs bullseye pbstest
 | 
				
			||||||
| 
						 | 
					@ -96,8 +92,7 @@ msg_ok "Added Beta/Test Repository"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Disable Subscription Nag? <y/N> " prompt
 | 
					read -r -p "Disable Subscription Nag? <y/N> " prompt
 | 
				
			||||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
 | 
					if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
 | 
				
			||||||
then
 | 
					 | 
				
			||||||
    msg_info "Disabling Subscription Nag"
 | 
					    msg_info "Disabling Subscription Nag"
 | 
				
			||||||
    echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script
 | 
					    echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script
 | 
				
			||||||
    apt --reinstall install proxmox-widget-toolkit &>/dev/null
 | 
					    apt --reinstall install proxmox-widget-toolkit &>/dev/null
 | 
				
			||||||
| 
						 | 
					@ -105,8 +100,7 @@ msg_ok "Disabled Subscription Nag"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Update Proxmox Backup Server now? <y/N> " prompt
 | 
					read -r -p "Update Proxmox Backup Server now? <y/N> " prompt
 | 
				
			||||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
 | 
					if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
 | 
				
			||||||
then
 | 
					 | 
				
			||||||
    msg_info "Updating Proxmox Backup Server (Patience)"
 | 
					    msg_info "Updating Proxmox Backup Server (Patience)"
 | 
				
			||||||
    apt-get update &>/dev/null
 | 
					    apt-get update &>/dev/null
 | 
				
			||||||
    apt-get -y dist-upgrade &>/dev/null
 | 
					    apt-get -y dist-upgrade &>/dev/null
 | 
				
			||||||
| 
						 | 
					@ -114,8 +108,7 @@ msg_ok "Updated Proxmox Backup Server (⚠ Reboot Recommended)"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Reboot Proxmox Backup Server now? <y/N> " prompt
 | 
					read -r -p "Reboot Proxmox Backup Server now? <y/N> " prompt
 | 
				
			||||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
 | 
					if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
 | 
				
			||||||
then
 | 
					 | 
				
			||||||
    msg_info "Rebooting Proxmox Backup Server"
 | 
					    msg_info "Rebooting Proxmox Backup Server"
 | 
				
			||||||
    sleep 2
 | 
					    sleep 2
 | 
				
			||||||
    msg_ok "Completed Post Install Routines"
 | 
					    msg_ok "Completed Post Install Routines"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,13 +1,13 @@
 | 
				
			||||||
#!/usr/bin/env bash -ex
 | 
					#!/usr/bin/env bash -ex
 | 
				
			||||||
set -euo pipefail
 | 
					set -euo pipefail
 | 
				
			||||||
shopt -s inherit_errexit nullglob
 | 
					shopt -s inherit_errexit nullglob
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -28,7 +28,7 @@ if ! command -v pveversion >/dev/null 2>&1; then
 | 
				
			||||||
    exit 1
 | 
					    exit 1
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ `pveversion | grep "pve-manager/7" | wc -l` -ne 1 ]; then
 | 
					if [ $(pveversion | grep "pve-manager/7" | wc -l) -ne 1 ]; then
 | 
				
			||||||
    echo -e "\n${RD}⚠ This version of Proxmox Virtual Environment is not supported"
 | 
					    echo -e "\n${RD}⚠ This version of Proxmox Virtual Environment is not supported"
 | 
				
			||||||
    echo -e "Requires PVE Version: 7.XX${CL}"
 | 
					    echo -e "Requires PVE Version: 7.XX${CL}"
 | 
				
			||||||
    echo -e "\nExiting..."
 | 
					    echo -e "\nExiting..."
 | 
				
			||||||
| 
						 | 
					@ -58,8 +58,7 @@ function msg_ok() {
 | 
				
			||||||
clear
 | 
					clear
 | 
				
			||||||
header_info
 | 
					header_info
 | 
				
			||||||
read -r -p "Disable Enterprise Repository? <y/N> " prompt
 | 
					read -r -p "Disable Enterprise Repository? <y/N> " prompt
 | 
				
			||||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
 | 
					if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
 | 
				
			||||||
then
 | 
					 | 
				
			||||||
    msg_info "Disabling Enterprise Repository"
 | 
					    msg_info "Disabling Enterprise Repository"
 | 
				
			||||||
    sleep 2
 | 
					    sleep 2
 | 
				
			||||||
    sed -i "s/^deb/#deb/g" /etc/apt/sources.list.d/pve-enterprise.list
 | 
					    sed -i "s/^deb/#deb/g" /etc/apt/sources.list.d/pve-enterprise.list
 | 
				
			||||||
| 
						 | 
					@ -67,8 +66,7 @@ msg_ok "Disabled Enterprise Repository"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Add/Correct PVE7 Sources (sources.list)? <y/N> " prompt
 | 
					read -r -p "Add/Correct PVE7 Sources (sources.list)? <y/N> " prompt
 | 
				
			||||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
 | 
					if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
 | 
				
			||||||
then
 | 
					 | 
				
			||||||
    msg_info "Adding or Correcting PVE7 Sources"
 | 
					    msg_info "Adding or Correcting PVE7 Sources"
 | 
				
			||||||
    cat <<EOF >/etc/apt/sources.list
 | 
					    cat <<EOF >/etc/apt/sources.list
 | 
				
			||||||
deb http://ftp.debian.org/debian bullseye main contrib
 | 
					deb http://ftp.debian.org/debian bullseye main contrib
 | 
				
			||||||
| 
						 | 
					@ -80,8 +78,7 @@ msg_ok "Added or Corrected PVE7 Sources"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Enable No-Subscription Repository? <y/N> " prompt
 | 
					read -r -p "Enable No-Subscription Repository? <y/N> " prompt
 | 
				
			||||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
 | 
					if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
 | 
				
			||||||
then
 | 
					 | 
				
			||||||
    msg_info "Enabling No-Subscription Repository"
 | 
					    msg_info "Enabling No-Subscription Repository"
 | 
				
			||||||
    cat <<EOF >>/etc/apt/sources.list
 | 
					    cat <<EOF >>/etc/apt/sources.list
 | 
				
			||||||
deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription
 | 
					deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription
 | 
				
			||||||
| 
						 | 
					@ -91,8 +88,7 @@ msg_ok "Enabled No-Subscription Repository"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Add (Disabled) Beta/Test Repository? <y/N> " prompt
 | 
					read -r -p "Add (Disabled) Beta/Test Repository? <y/N> " prompt
 | 
				
			||||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
 | 
					if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
 | 
				
			||||||
then
 | 
					 | 
				
			||||||
    msg_info "Adding Beta/Test Repository and set disabled"
 | 
					    msg_info "Adding Beta/Test Repository and set disabled"
 | 
				
			||||||
    cat <<EOF >>/etc/apt/sources.list
 | 
					    cat <<EOF >>/etc/apt/sources.list
 | 
				
			||||||
# deb http://download.proxmox.com/debian/pve bullseye pvetest
 | 
					# deb http://download.proxmox.com/debian/pve bullseye pvetest
 | 
				
			||||||
| 
						 | 
					@ -102,8 +98,7 @@ msg_ok "Added Beta/Test Repository"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Disable Subscription Nag? <y/N> " prompt
 | 
					read -r -p "Disable Subscription Nag? <y/N> " prompt
 | 
				
			||||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
 | 
					if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
 | 
				
			||||||
then
 | 
					 | 
				
			||||||
    msg_info "Disabling Subscription Nag"
 | 
					    msg_info "Disabling Subscription Nag"
 | 
				
			||||||
    echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script
 | 
					    echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script
 | 
				
			||||||
    apt --reinstall install proxmox-widget-toolkit &>/dev/null
 | 
					    apt --reinstall install proxmox-widget-toolkit &>/dev/null
 | 
				
			||||||
| 
						 | 
					@ -111,8 +106,7 @@ msg_ok "Disabled Subscription Nag (Delete browser cache)"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Update Proxmox VE 7 now? <y/N> " prompt
 | 
					read -r -p "Update Proxmox VE 7 now? <y/N> " prompt
 | 
				
			||||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
 | 
					if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
 | 
				
			||||||
then
 | 
					 | 
				
			||||||
    msg_info "Updating Proxmox VE 7 (Patience)"
 | 
					    msg_info "Updating Proxmox VE 7 (Patience)"
 | 
				
			||||||
    apt-get update &>/dev/null
 | 
					    apt-get update &>/dev/null
 | 
				
			||||||
    apt-get -y dist-upgrade &>/dev/null
 | 
					    apt-get -y dist-upgrade &>/dev/null
 | 
				
			||||||
| 
						 | 
					@ -120,8 +114,7 @@ msg_ok "Updated Proxmox VE 7 (⚠ Reboot Recommended)"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Reboot Proxmox VE 7 now? <y/N> " prompt
 | 
					read -r -p "Reboot Proxmox VE 7 now? <y/N> " prompt
 | 
				
			||||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
 | 
					if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
 | 
				
			||||||
then
 | 
					 | 
				
			||||||
    msg_info "Rebooting Proxmox VE 7"
 | 
					    msg_info "Rebooting Proxmox VE 7"
 | 
				
			||||||
    sleep 2
 | 
					    sleep 2
 | 
				
			||||||
    msg_ok "Completed Post Install Routines"
 | 
					    msg_ok "Completed Post Install Routines"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,11 +22,11 @@ echo -e "
 | 
				
			||||||
"
 | 
					"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
show_menu() {
 | 
					show_menu() {
 | 
				
			||||||
    CL=`echo "\033[m"`
 | 
					    CL=$(echo "\033[m")
 | 
				
			||||||
    GN=`echo "\033[32m"`
 | 
					    GN=$(echo "\033[32m")
 | 
				
			||||||
    BL=`echo "\033[36m"`
 | 
					    BL=$(echo "\033[36m")
 | 
				
			||||||
    YW=`echo "\033[33m"`
 | 
					    YW=$(echo "\033[33m")
 | 
				
			||||||
    fgred=`echo "\033[31m"`
 | 
					    fgred=$(echo "\033[31m")
 | 
				
			||||||
    header_info
 | 
					    header_info
 | 
				
			||||||
    CK=$(uname -r)
 | 
					    CK=$(uname -r)
 | 
				
			||||||
    IP=$(hostname -I)
 | 
					    IP=$(hostname -I)
 | 
				
			||||||
| 
						 | 
					@ -57,42 +57,50 @@ header_info
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
clear
 | 
					clear
 | 
				
			||||||
show_menu
 | 
					show_menu
 | 
				
			||||||
while [ $opt != '' ]
 | 
					while [ $opt != '' ]; do
 | 
				
			||||||
    do
 | 
					 | 
				
			||||||
    if [ $opt = '' ]; then
 | 
					    if [ $opt = '' ]; then
 | 
				
			||||||
      exit;
 | 
					        exit
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
        case $opt in
 | 
					        case $opt in
 | 
				
			||||||
        1) echo "conservative" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
 | 
					        1)
 | 
				
			||||||
 | 
					            echo "conservative" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
 | 
				
			||||||
            clear
 | 
					            clear
 | 
				
			||||||
            show_menu
 | 
					            show_menu
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
        2) echo "ondemand" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
 | 
					        2)
 | 
				
			||||||
 | 
					            echo "ondemand" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
 | 
				
			||||||
            clear
 | 
					            clear
 | 
				
			||||||
            show_menu
 | 
					            show_menu
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
        3) echo "userspace" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
 | 
					        3)
 | 
				
			||||||
 | 
					            echo "userspace" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
 | 
				
			||||||
            clear
 | 
					            clear
 | 
				
			||||||
            show_menu
 | 
					            show_menu
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
        4) echo "powersave" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
 | 
					        4)
 | 
				
			||||||
 | 
					            echo "powersave" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
 | 
				
			||||||
            clear
 | 
					            clear
 | 
				
			||||||
            show_menu
 | 
					            show_menu
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
        5) echo "performance" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
 | 
					        5)
 | 
				
			||||||
 | 
					            echo "performance" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
 | 
				
			||||||
            clear
 | 
					            clear
 | 
				
			||||||
            show_menu
 | 
					            show_menu
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
        6) echo "schedutil" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
 | 
					        6)
 | 
				
			||||||
 | 
					            echo "schedutil" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
 | 
				
			||||||
            clear
 | 
					            clear
 | 
				
			||||||
            show_menu
 | 
					            show_menu
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
        x)exit;
 | 
					        x)
 | 
				
			||||||
 | 
					            exit
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
        \n)exit;
 | 
					        \n)
 | 
				
			||||||
 | 
					            exit
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
        *)clear;
 | 
					        *)
 | 
				
			||||||
            show_menu;
 | 
					            clear
 | 
				
			||||||
 | 
					            show_menu
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
        esac
 | 
					        esac
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -14,30 +14,25 @@ echo "==============================="
 | 
				
			||||||
echo "Technitium DNS Server Update"
 | 
					echo "Technitium DNS Server Update"
 | 
				
			||||||
echo "==============================="
 | 
					echo "==============================="
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if dotnet --list-runtimes 2> /dev/null | grep -q "Microsoft.NETCore.App 6.0."; 
 | 
					if dotnet --list-runtimes 2>/dev/null | grep -q "Microsoft.NETCore.App 6.0."; then
 | 
				
			||||||
then
 | 
					 | 
				
			||||||
	dotnetFound="yes"
 | 
						dotnetFound="yes"
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
	dotnetFound="no"
 | 
						dotnetFound="no"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if [ -d $dotnetDir ]
 | 
					if [ -d $dotnetDir ]; then
 | 
				
			||||||
	then
 | 
					 | 
				
			||||||
	dotnetUpdate="yes"
 | 
						dotnetUpdate="yes"
 | 
				
			||||||
	echo "Updating .NET 6 Runtime..."
 | 
						echo "Updating .NET 6 Runtime..."
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -c 6.0 --runtime dotnet --no-path --install-dir $dotnetDir --verbose >>$installLog 2>&1
 | 
					curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -c 6.0 --runtime dotnet --no-path --install-dir $dotnetDir --verbose >>$installLog 2>&1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if [ ! -f "/usr/bin/dotnet" ]
 | 
					if [ ! -f "/usr/bin/dotnet" ]; then
 | 
				
			||||||
	then
 | 
					 | 
				
			||||||
	ln -s $dotnetDir/dotnet /usr/bin >>$installLog 2>&1
 | 
						ln -s $dotnetDir/dotnet /usr/bin >>$installLog 2>&1
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if dotnet --list-runtimes 2> /dev/null | grep -q "Microsoft.NETCore.App 6.0."; 
 | 
					if dotnet --list-runtimes 2>/dev/null | grep -q "Microsoft.NETCore.App 6.0."; then
 | 
				
			||||||
	then
 | 
						if [ "$dotnetUpdate" = "yes" ]; then
 | 
				
			||||||
		if [ "$dotnetUpdate" = "yes" ]
 | 
					 | 
				
			||||||
		then
 | 
					 | 
				
			||||||
		echo ".NET 6 Runtime was updated successfully!"
 | 
							echo ".NET 6 Runtime was updated successfully!"
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
| 
						 | 
					@ -45,19 +40,15 @@ fi
 | 
				
			||||||
	exit 1
 | 
						exit 1
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if curl -o $dnsTar --fail $dnsUrl >> $installLog 2>&1
 | 
					if curl -o $dnsTar --fail $dnsUrl >>$installLog 2>&1; then
 | 
				
			||||||
then
 | 
						if [ -d $dnsDir ]; then
 | 
				
			||||||
	if [ -d $dnsDir ]
 | 
					 | 
				
			||||||
	then
 | 
					 | 
				
			||||||
		echo "Updating Technitium DNS Server..."
 | 
							echo "Updating Technitium DNS Server..."
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	tar -zxf $dnsTar -C $dnsDir >>$installLog 2>&1
 | 
						tar -zxf $dnsTar -C $dnsDir >>$installLog 2>&1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if [ "$(ps --no-headers -o comm 1 | tr -d '\n')" = "systemd" ] 
 | 
						if [ "$(ps --no-headers -o comm 1 | tr -d '\n')" = "systemd" ]; then
 | 
				
			||||||
	then
 | 
							if [ -f "/etc/systemd/system/dns.service" ]; then
 | 
				
			||||||
		if [ -f "/etc/systemd/system/dns.service" ]
 | 
					 | 
				
			||||||
		then
 | 
					 | 
				
			||||||
			echo "Restarting systemd service..."
 | 
								echo "Restarting systemd service..."
 | 
				
			||||||
			systemctl restart dns.service >>$installLog 2>&1
 | 
								systemctl restart dns.service >>$installLog 2>&1
 | 
				
			||||||
		fi
 | 
							fi
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,13 +1,13 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
RELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest \
 | 
					RELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest |
 | 
				
			||||||
| grep "tag_name" \
 | 
					    grep "tag_name" |
 | 
				
			||||||
| awk '{print substr($2, 3, length($2)-4) }')
 | 
					    awk '{print substr($2, 3, length($2)-4) }')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
CM='\xE2\x9C\x94\033'
 | 
					CM='\xE2\x9C\x94\033'
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
function update_info {
 | 
					function update_info {
 | 
				
			||||||
    cat <<"EOF"
 | 
					    cat <<"EOF"
 | 
				
			||||||
  ______     _ ___               
 | 
					  ______     _ ___               
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,10 +1,10 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
CM='\xE2\x9C\x94\033'
 | 
					CM='\xE2\x9C\x94\033'
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
APP="UniFi Update"
 | 
					APP="UniFi Update"
 | 
				
			||||||
while true; do
 | 
					while true; do
 | 
				
			||||||
    read -p "This will run ${APP}. Proceed(y/n)?" yn
 | 
					    read -p "This will run ${APP}. Proceed(y/n)?" yn
 | 
				
			||||||
| 
						 | 
					@ -30,4 +30,3 @@ ${CL}"
 | 
				
			||||||
header_info
 | 
					header_info
 | 
				
			||||||
sleep 3
 | 
					sleep 3
 | 
				
			||||||
wget -qL https://get.glennr.nl/unifi/update/unifi-update.sh && bash unifi-update.sh
 | 
					wget -qL https://get.glennr.nl/unifi/update/unifi-update.sh && bash unifi-update.sh
 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +1,11 @@
 | 
				
			||||||
#!/bin/bash
 | 
					#!/bin/bash
 | 
				
			||||||
set -e
 | 
					set -e
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
CM='\xE2\x9C\x94\033'
 | 
					CM='\xE2\x9C\x94\033'
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
while true; do
 | 
					while true; do
 | 
				
			||||||
  read -p "This Will Update All LXC Containers. Proceed(y/n)?" yn
 | 
					  read -p "This Will Update All LXC Containers. Proceed(y/n)?" yn
 | 
				
			||||||
  case $yn in
 | 
					  case $yn in
 | 
				
			||||||
| 
						 | 
					@ -39,16 +39,14 @@ function update_container() {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
read -p "Skip stopped containers? " -n 1 -r
 | 
					read -p "Skip stopped containers? " -n 1 -r
 | 
				
			||||||
echo
 | 
					echo
 | 
				
			||||||
if [[ ! $REPLY =~ ^[Yy]$ ]]
 | 
					if [[ ! $REPLY =~ ^[Yy]$ ]]; then
 | 
				
			||||||
then
 | 
					 | 
				
			||||||
  skip=no
 | 
					  skip=no
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
  skip=yes
 | 
					  skip=yes
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
for container in $containers
 | 
					for container in $containers; do
 | 
				
			||||||
do
 | 
					  status=$(pct status $container)
 | 
				
			||||||
  status=`pct status $container`
 | 
					 | 
				
			||||||
  if [ "$skip" == "no" ]; then
 | 
					  if [ "$skip" == "no" ]; then
 | 
				
			||||||
    if [ "$status" == "status: stopped" ]; then
 | 
					    if [ "$status" == "status: stopped" ]; then
 | 
				
			||||||
      echo -e "${BL}[Info]${GN} Starting${BL} $container ${CL} \n"
 | 
					      echo -e "${BL}[Info]${GN} Starting${BL} $container ${CL} \n"
 | 
				
			||||||
| 
						 | 
					@ -67,6 +65,7 @@ do
 | 
				
			||||||
      update_container $container
 | 
					      update_container $container
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
done; wait
 | 
					done
 | 
				
			||||||
 | 
					wait
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo -e "${GN} Finished, All Containers Updated. ${CL} \n"
 | 
					echo -e "${GN} Finished, All Containers Updated. ${CL} \n"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,12 +1,12 @@
 | 
				
			||||||
#!/usr/bin/env bash -ex
 | 
					#!/usr/bin/env bash -ex
 | 
				
			||||||
LATEST=$(curl -sL https://api.github.com/repos/louislam/uptime-kuma/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
 | 
					LATEST=$(curl -sL https://api.github.com/repos/louislam/uptime-kuma/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BGN=`echo "\033[4;92m"`
 | 
					BGN=$(echo "\033[4;92m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
DGN=`echo "\033[32m"`
 | 
					DGN=$(echo "\033[32m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
HOLD="-"
 | 
					HOLD="-"
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
| 
						 | 
					@ -45,7 +45,10 @@ function msg_ok() {
 | 
				
			||||||
    echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
 | 
					    echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ ! -d "/opt/uptime-kuma" ]; then echo -e "No Uptime Kuma Directory Found."; exit; fi
 | 
					if [ ! -d "/opt/uptime-kuma" ]; then
 | 
				
			||||||
 | 
					    echo -e "No Uptime Kuma Directory Found."
 | 
				
			||||||
 | 
					    exit
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
msg_info "Stopping ${APP}"
 | 
					msg_info "Stopping ${APP}"
 | 
				
			||||||
sudo systemctl stop uptime-kuma &>/dev/null
 | 
					sudo systemctl stop uptime-kuma &>/dev/null
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,13 +1,13 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
VAULT=$(curl -s https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest \
 | 
					VAULT=$(curl -s https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest |
 | 
				
			||||||
| grep "tag_name" \
 | 
					    grep "tag_name" |
 | 
				
			||||||
| awk '{print substr($2, 2, length($2)-3) }')
 | 
					    awk '{print substr($2, 2, length($2)-3) }')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
CM='\xE2\x9C\x94\033'
 | 
					CM='\xE2\x9C\x94\033'
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
function update_info {
 | 
					function update_info {
 | 
				
			||||||
    echo -e "${BL}
 | 
					    echo -e "${BL}
 | 
				
			||||||
 __      __         _ _                         _            
 | 
					 __      __         _ _                         _            
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,13 +1,13 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
VWRELEASE=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/releases/latest \
 | 
					VWRELEASE=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/releases/latest |
 | 
				
			||||||
| grep "tag_name" \
 | 
					    grep "tag_name" |
 | 
				
			||||||
| awk '{print substr($2, 2, length($2)-3) }')
 | 
					    awk '{print substr($2, 2, length($2)-3) }')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
CM='\xE2\x9C\x94\033'
 | 
					CM='\xE2\x9C\x94\033'
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
function update_info {
 | 
					function update_info {
 | 
				
			||||||
    echo -e "${BL}
 | 
					    echo -e "${BL}
 | 
				
			||||||
 __          __  _                            _ _   
 | 
					 __          __  _                            _ _   
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +1,11 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
CM='\xE2\x9C\x94\033'
 | 
					CM='\xE2\x9C\x94\033'
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
while true; do
 | 
					while true; do
 | 
				
			||||||
    read -p "This will Install Webmin, Proceed(y/n)?" yn
 | 
					    read -p "This will Install Webmin, Proceed(y/n)?" yn
 | 
				
			||||||
    case $yn in
 | 
					    case $yn in
 | 
				
			||||||
| 
						 | 
					@ -36,5 +36,4 @@ echo -e "${CM}${CL} \r"
 | 
				
			||||||
IP=$(hostname -I | cut -f1 -d ' ')
 | 
					IP=$(hostname -I | cut -f1 -d ' ')
 | 
				
			||||||
echo -e "Successfully Installed!! Webmin should be reachable by going to https://${IP}:10000"
 | 
					echo -e "Successfully Installed!! Webmin should be reachable by going to https://${IP}:10000"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/webmin.sh)"
 | 
					# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/webmin.sh)"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -73,9 +73,9 @@ while [ -z "${CTID_TO:+x}" ]; do
 | 
				
			||||||
    "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
 | 
					    "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
for i in ${!CTID_MENU[@]}; do
 | 
					for i in ${!CTID_MENU[@]}; do
 | 
				
			||||||
  [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && \
 | 
					  [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
 | 
				
			||||||
    CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
					    CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
				
			||||||
  [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && \
 | 
					  [ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
 | 
				
			||||||
    CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
					    CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
whiptail --defaultno --title "$TITLE" --yesno \
 | 
					whiptail --defaultno --title "$TITLE" --yesno \
 | 
				
			||||||
| 
						 | 
					@ -89,13 +89,13 @@ if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
msg "Mounting Container Disks..."
 | 
					msg "Mounting Container Disks..."
 | 
				
			||||||
DATA_PATH=/opt/zigbee2mqtt/data/
 | 
					DATA_PATH=/opt/zigbee2mqtt/data/
 | 
				
			||||||
CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || \
 | 
					CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") ||
 | 
				
			||||||
  die "There was a problem mounting the root disk of LXC '${CTID_FROM}'."
 | 
					  die "There was a problem mounting the root disk of LXC '${CTID_FROM}'."
 | 
				
			||||||
[ -d "${CTID_FROM_PATH}${DATA_PATH}" ] || \
 | 
					[ -d "${CTID_FROM_PATH}${DATA_PATH}" ] ||
 | 
				
			||||||
  die "Zigbee2igbee2MQTT directories in '$CTID_FROM' not found."
 | 
					  die "Zigbee2igbee2MQTT directories in '$CTID_FROM' not found."
 | 
				
			||||||
CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || \
 | 
					CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") ||
 | 
				
			||||||
  die "There was a problem mounting the root disk of LXC '${CTID_TO}'."
 | 
					  die "There was a problem mounting the root disk of LXC '${CTID_TO}'."
 | 
				
			||||||
[ -d "${CTID_TO_PATH}${DATA_PATH}" ] || \
 | 
					[ -d "${CTID_TO_PATH}${DATA_PATH}" ] ||
 | 
				
			||||||
  die "Zigbee2MQTT directories in '$CTID_TO' not found."
 | 
					  die "Zigbee2MQTT directories in '$CTID_TO' not found."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#rm -rf ${CTID_TO_PATH}${DATA_PATH}
 | 
					#rm -rf ${CTID_TO_PATH}${DATA_PATH}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -74,9 +74,9 @@ while [ -z "${CTID_TO:+x}" ]; do
 | 
				
			||||||
    "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
 | 
					    "${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
for i in ${!CTID_MENU[@]}; do
 | 
					for i in ${!CTID_MENU[@]}; do
 | 
				
			||||||
  [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] && \
 | 
					  [ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
 | 
				
			||||||
    CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
					    CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
				
			||||||
  [ "${CTID_MENU[$i]}" == "$CTID_TO" ] && \
 | 
					  [ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
 | 
				
			||||||
    CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
					    CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
whiptail --defaultno --title "$TITLE" --yesno \
 | 
					whiptail --defaultno --title "$TITLE" --yesno \
 | 
				
			||||||
| 
						 | 
					@ -91,13 +91,13 @@ fi
 | 
				
			||||||
msg "Mounting Container Disks..."
 | 
					msg "Mounting Container Disks..."
 | 
				
			||||||
DATA_PATH=/opt/zwavejs2mqtt/store/
 | 
					DATA_PATH=/opt/zwavejs2mqtt/store/
 | 
				
			||||||
DATA_PATH_NEW=/opt/zwave-js-ui/store/
 | 
					DATA_PATH_NEW=/opt/zwave-js-ui/store/
 | 
				
			||||||
CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || \
 | 
					CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") ||
 | 
				
			||||||
  die "There was a problem mounting the root disk of LXC '${CTID_FROM}'."
 | 
					  die "There was a problem mounting the root disk of LXC '${CTID_FROM}'."
 | 
				
			||||||
[ -d "${CTID_FROM_PATH}${DATA_PATH}" ] || \
 | 
					[ -d "${CTID_FROM_PATH}${DATA_PATH}" ] ||
 | 
				
			||||||
  die "Zwavejs2MQTT directories in '$CTID_FROM' not found."
 | 
					  die "Zwavejs2MQTT directories in '$CTID_FROM' not found."
 | 
				
			||||||
CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || \
 | 
					CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") ||
 | 
				
			||||||
  die "There was a problem mounting the root disk of LXC '${CTID_TO}'."
 | 
					  die "There was a problem mounting the root disk of LXC '${CTID_TO}'."
 | 
				
			||||||
[ -d "${CTID_TO_PATH}${DATA_PATH_NEW}" ] || \
 | 
					[ -d "${CTID_TO_PATH}${DATA_PATH_NEW}" ] ||
 | 
				
			||||||
  die "Zwavejs2MQTT directories in '$CTID_TO' not found."
 | 
					  die "Zwavejs2MQTT directories in '$CTID_TO' not found."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#rm -rf ${CTID_TO_PATH}${DATA_PATH}
 | 
					#rm -rf ${CTID_TO_PATH}${DATA_PATH}
 | 
				
			||||||
| 
						 | 
					@ -117,4 +117,3 @@ rsync ${RSYNC_OPTIONS[*]} ${CTID_FROM_PATH}${DATA_PATH} ${CTID_TO_PATH}${DATA_PA
 | 
				
			||||||
echo -en "\e[1A\e[0K\e[1A\e[0K"
 | 
					echo -en "\e[1A\e[0K\e[1A\e[0K"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
info "Successfully Transferred Data."
 | 
					info "Successfully Transferred Data."
 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +1,11 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
 | 
					RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
 | 
				
			||||||
set -e
 | 
					set -e
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
CM="${GN}✓${CL}"
 | 
					CM="${GN}✓${CL}"
 | 
				
			||||||
CROSS="${RD}✗${CL}"
 | 
					CROSS="${RD}✗${CL}"
 | 
				
			||||||
BFR="\\r\\033[K"
 | 
					BFR="\\r\\033[K"
 | 
				
			||||||
| 
						 | 
					@ -43,7 +43,10 @@ while true; do
 | 
				
			||||||
    *) echo "Please answer yes or no." ;;
 | 
					    *) echo "Please answer yes or no." ;;
 | 
				
			||||||
    esac
 | 
					    esac
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
if [ ! -d /opt/zwave-js-ui ]; then msg_error "No Zwave JS UI Install Detected!"; exit; fi
 | 
					if [ ! -d /opt/zwave-js-ui ]; then
 | 
				
			||||||
 | 
					    msg_error "No Zwave JS UI Install Detected!"
 | 
				
			||||||
 | 
					    exit
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
msg_info "Stopping Z-wave JS UI"
 | 
					msg_info "Stopping Z-wave JS UI"
 | 
				
			||||||
systemctl stop zwave-js-ui.service
 | 
					systemctl stop zwave-js-ui.service
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,9 +1,9 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
RETRY_NUM=10
 | 
					RETRY_NUM=10
 | 
				
			||||||
RETRY_EVERY=3
 | 
					RETRY_EVERY=3
 | 
				
			||||||
NUM=$RETRY_NUM
 | 
					NUM=$RETRY_NUM
 | 
				
			||||||
| 
						 | 
					@ -47,12 +47,11 @@ msg_info "Setting up Container OS "
 | 
				
			||||||
sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
 | 
					sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
 | 
				
			||||||
locale-gen >/dev/null
 | 
					locale-gen >/dev/null
 | 
				
			||||||
while [ "$(hostname -I)" = "" ]; do
 | 
					while [ "$(hostname -I)" = "" ]; do
 | 
				
			||||||
  1>&2 echo -en "${CROSS}${RD} No Network! "
 | 
					  echo 1>&2 -en "${CROSS}${RD} No Network! "
 | 
				
			||||||
  sleep $RETRY_EVERY
 | 
					  sleep $RETRY_EVERY
 | 
				
			||||||
  ((NUM--))
 | 
					  ((NUM--))
 | 
				
			||||||
  if [ $NUM -eq 0 ]
 | 
					  if [ $NUM -eq 0 ]; then
 | 
				
			||||||
  then
 | 
					    echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
 | 
				
			||||||
    1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"    
 | 
					 | 
				
			||||||
    exit 1
 | 
					    exit 1
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
| 
						 | 
					@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set +e
 | 
					set +e
 | 
				
			||||||
alias die=''
 | 
					alias die=''
 | 
				
			||||||
if nc -zw1 8.8.8.8 443; then  msg_ok "Internet Connected"; else  msg_error "Internet NOT Connected"; exit 1; fi;
 | 
					if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else
 | 
				
			||||||
 | 
					  msg_error "Internet NOT Connected"
 | 
				
			||||||
 | 
					  exit 1
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs)
 | 
					RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs)
 | 
				
			||||||
if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure";  else msg_ok "DNS Resolved github.com to $RESOLVEDIP";  fi;
 | 
					if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi
 | 
				
			||||||
alias die='EXIT=$? LINE=$LINENO error_exit'
 | 
					alias die='EXIT=$? LINE=$LINENO error_exit'
 | 
				
			||||||
set -e
 | 
					set -e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -81,7 +83,7 @@ msg_info "Installing AdGuard Home"
 | 
				
			||||||
curl -sSL https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh &>/dev/null
 | 
					curl -sSL https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh &>/dev/null
 | 
				
			||||||
msg_ok "Installed AdGuard Home"
 | 
					msg_ok "Installed AdGuard Home"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PASS=$(grep -w "root" /etc/shadow | cut -b6);
 | 
					PASS=$(grep -w "root" /etc/shadow | cut -b6)
 | 
				
			||||||
if [[ $PASS != $ ]]; then
 | 
					if [[ $PASS != $ ]]; then
 | 
				
			||||||
  msg_info "Customizing Container"
 | 
					  msg_info "Customizing Container"
 | 
				
			||||||
  rm /etc/motd
 | 
					  rm /etc/motd
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,9 +1,9 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
RETRY_NUM=10
 | 
					RETRY_NUM=10
 | 
				
			||||||
RETRY_EVERY=3
 | 
					RETRY_EVERY=3
 | 
				
			||||||
NUM=$RETRY_NUM
 | 
					NUM=$RETRY_NUM
 | 
				
			||||||
| 
						 | 
					@ -46,12 +46,11 @@ msg_info "Setting up Container OS "
 | 
				
			||||||
sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
 | 
					sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
 | 
				
			||||||
locale-gen >/dev/null
 | 
					locale-gen >/dev/null
 | 
				
			||||||
while [ "$(hostname -I)" = "" ]; do
 | 
					while [ "$(hostname -I)" = "" ]; do
 | 
				
			||||||
  1>&2 echo -en "${CROSS}${RD} No Network! "
 | 
					  echo 1>&2 -en "${CROSS}${RD} No Network! "
 | 
				
			||||||
  sleep $RETRY_EVERY
 | 
					  sleep $RETRY_EVERY
 | 
				
			||||||
  ((NUM--))
 | 
					  ((NUM--))
 | 
				
			||||||
  if [ $NUM -eq 0 ]
 | 
					  if [ $NUM -eq 0 ]; then
 | 
				
			||||||
  then
 | 
					    echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
 | 
				
			||||||
    1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"    
 | 
					 | 
				
			||||||
    exit 1
 | 
					    exit 1
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
| 
						 | 
					@ -60,9 +59,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set +e
 | 
					set +e
 | 
				
			||||||
alias die=''
 | 
					alias die=''
 | 
				
			||||||
if nc -zw1 8.8.8.8 443; then  msg_ok "Internet Connected"; else  msg_error "Internet NOT Connected"; exit 1; fi;
 | 
					if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else
 | 
				
			||||||
 | 
					  msg_error "Internet NOT Connected"
 | 
				
			||||||
 | 
					  exit 1
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs)
 | 
					RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs)
 | 
				
			||||||
if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure";  else msg_ok "DNS Resolved github.com to $RESOLVEDIP";  fi;
 | 
					if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi
 | 
				
			||||||
alias die='EXIT=$? LINE=$LINENO error_exit'
 | 
					alias die='EXIT=$? LINE=$LINENO error_exit'
 | 
				
			||||||
set -e
 | 
					set -e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -338,7 +340,7 @@ EOF
 | 
				
			||||||
systemctl enable --now blocky
 | 
					systemctl enable --now blocky
 | 
				
			||||||
msg_ok "Created Service"
 | 
					msg_ok "Created Service"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PASS=$(grep -w "root" /etc/shadow | cut -b6);
 | 
					PASS=$(grep -w "root" /etc/shadow | cut -b6)
 | 
				
			||||||
if [[ $PASS != $ ]]; then
 | 
					if [[ $PASS != $ ]]; then
 | 
				
			||||||
  msg_info "Customizing Container"
 | 
					  msg_info "Customizing Container"
 | 
				
			||||||
  chmod -x /etc/update-motd.d/*
 | 
					  chmod -x /etc/update-motd.d/*
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,9 +1,9 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
RETRY_NUM=10
 | 
					RETRY_NUM=10
 | 
				
			||||||
RETRY_EVERY=3
 | 
					RETRY_EVERY=3
 | 
				
			||||||
NUM=$RETRY_NUM
 | 
					NUM=$RETRY_NUM
 | 
				
			||||||
| 
						 | 
					@ -47,12 +47,11 @@ msg_info "Setting up Container OS "
 | 
				
			||||||
sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
 | 
					sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
 | 
				
			||||||
locale-gen >/dev/null
 | 
					locale-gen >/dev/null
 | 
				
			||||||
while [ "$(hostname -I)" = "" ]; do
 | 
					while [ "$(hostname -I)" = "" ]; do
 | 
				
			||||||
  1>&2 echo -en "${CROSS}${RD} No Network! "
 | 
					  echo 1>&2 -en "${CROSS}${RD} No Network! "
 | 
				
			||||||
  sleep $RETRY_EVERY
 | 
					  sleep $RETRY_EVERY
 | 
				
			||||||
  ((NUM--))
 | 
					  ((NUM--))
 | 
				
			||||||
  if [ $NUM -eq 0 ]
 | 
					  if [ $NUM -eq 0 ]; then
 | 
				
			||||||
  then
 | 
					    echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
 | 
				
			||||||
    1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"    
 | 
					 | 
				
			||||||
    exit 1
 | 
					    exit 1
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
| 
						 | 
					@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set +e
 | 
					set +e
 | 
				
			||||||
alias die=''
 | 
					alias die=''
 | 
				
			||||||
if nc -zw1 8.8.8.8 443; then  msg_ok "Internet Connected"; else  msg_error "Internet NOT Connected"; exit 1; fi;
 | 
					if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else
 | 
				
			||||||
 | 
					  msg_error "Internet NOT Connected"
 | 
				
			||||||
 | 
					  exit 1
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs)
 | 
					RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs)
 | 
				
			||||||
if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure";  else msg_ok "DNS Resolved github.com to $RESOLVEDIP";  fi;
 | 
					if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi
 | 
				
			||||||
alias die='EXIT=$? LINE=$LINENO error_exit'
 | 
					alias die='EXIT=$? LINE=$LINENO error_exit'
 | 
				
			||||||
set -e
 | 
					set -e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -90,7 +92,7 @@ msg_info "Installing CasaOS (Patience)"
 | 
				
			||||||
wget -qO- https://get.casaos.io | bash &>/dev/null
 | 
					wget -qO- https://get.casaos.io | bash &>/dev/null
 | 
				
			||||||
msg_ok "Installed CasaOS"
 | 
					msg_ok "Installed CasaOS"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PASS=$(grep -w "root" /etc/shadow | cut -b6);
 | 
					PASS=$(grep -w "root" /etc/shadow | cut -b6)
 | 
				
			||||||
if [[ $PASS != $ ]]; then
 | 
					if [[ $PASS != $ ]]; then
 | 
				
			||||||
  msg_info "Customizing Container"
 | 
					  msg_info "Customizing Container"
 | 
				
			||||||
  rm /etc/motd
 | 
					  rm /etc/motd
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,9 +1,9 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
RETRY_NUM=10
 | 
					RETRY_NUM=10
 | 
				
			||||||
RETRY_EVERY=3
 | 
					RETRY_EVERY=3
 | 
				
			||||||
NUM=$RETRY_NUM
 | 
					NUM=$RETRY_NUM
 | 
				
			||||||
| 
						 | 
					@ -47,12 +47,11 @@ msg_info "Setting up Container OS "
 | 
				
			||||||
sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
 | 
					sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
 | 
				
			||||||
locale-gen >/dev/null
 | 
					locale-gen >/dev/null
 | 
				
			||||||
while [ "$(hostname -I)" = "" ]; do
 | 
					while [ "$(hostname -I)" = "" ]; do
 | 
				
			||||||
  1>&2 echo -en "${CROSS}${RD} No Network! "
 | 
					  echo 1>&2 -en "${CROSS}${RD} No Network! "
 | 
				
			||||||
  sleep $RETRY_EVERY
 | 
					  sleep $RETRY_EVERY
 | 
				
			||||||
  ((NUM--))
 | 
					  ((NUM--))
 | 
				
			||||||
  if [ $NUM -eq 0 ]
 | 
					  if [ $NUM -eq 0 ]; then
 | 
				
			||||||
  then
 | 
					    echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
 | 
				
			||||||
    1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"    
 | 
					 | 
				
			||||||
    exit 1
 | 
					    exit 1
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
| 
						 | 
					@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set +e
 | 
					set +e
 | 
				
			||||||
alias die=''
 | 
					alias die=''
 | 
				
			||||||
if nc -zw1 8.8.8.8 443; then  msg_ok "Internet Connected"; else  msg_error "Internet NOT Connected"; exit 1; fi;
 | 
					if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else
 | 
				
			||||||
 | 
					  msg_error "Internet NOT Connected"
 | 
				
			||||||
 | 
					  exit 1
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs)
 | 
					RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs)
 | 
				
			||||||
if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure";  else msg_ok "DNS Resolved github.com to $RESOLVEDIP";  fi;
 | 
					if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi
 | 
				
			||||||
alias die='EXIT=$? LINE=$LINENO error_exit'
 | 
					alias die='EXIT=$? LINE=$LINENO error_exit'
 | 
				
			||||||
set -e
 | 
					set -e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -83,7 +85,7 @@ wget -qL https://github.com/tteck/Proxmox/raw/main/misc/daemonsync_2.2.0.0059_am
 | 
				
			||||||
sudo dpkg -i daemonsync_2.2.0.0059_amd64.deb &>/dev/null
 | 
					sudo dpkg -i daemonsync_2.2.0.0059_amd64.deb &>/dev/null
 | 
				
			||||||
msg_ok "Installed Daemon Sync Server"
 | 
					msg_ok "Installed Daemon Sync Server"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PASS=$(grep -w "root" /etc/shadow | cut -b6);
 | 
					PASS=$(grep -w "root" /etc/shadow | cut -b6)
 | 
				
			||||||
if [[ $PASS != $ ]]; then
 | 
					if [[ $PASS != $ ]]; then
 | 
				
			||||||
  msg_info "Customizing Container"
 | 
					  msg_info "Customizing Container"
 | 
				
			||||||
  rm /etc/motd
 | 
					  rm /etc/motd
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,9 +1,9 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
RETRY_NUM=10
 | 
					RETRY_NUM=10
 | 
				
			||||||
RETRY_EVERY=3
 | 
					RETRY_EVERY=3
 | 
				
			||||||
NUM=$RETRY_NUM
 | 
					NUM=$RETRY_NUM
 | 
				
			||||||
| 
						 | 
					@ -47,12 +47,11 @@ msg_info "Setting up Container OS "
 | 
				
			||||||
sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
 | 
					sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
 | 
				
			||||||
locale-gen >/dev/null
 | 
					locale-gen >/dev/null
 | 
				
			||||||
while [ "$(hostname -I)" = "" ]; do
 | 
					while [ "$(hostname -I)" = "" ]; do
 | 
				
			||||||
  1>&2 echo -en "${CROSS}${RD} No Network! "
 | 
					  echo 1>&2 -en "${CROSS}${RD} No Network! "
 | 
				
			||||||
  sleep $RETRY_EVERY
 | 
					  sleep $RETRY_EVERY
 | 
				
			||||||
  ((NUM--))
 | 
					  ((NUM--))
 | 
				
			||||||
  if [ $NUM -eq 0 ]
 | 
					  if [ $NUM -eq 0 ]; then
 | 
				
			||||||
  then
 | 
					    echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
 | 
				
			||||||
    1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"    
 | 
					 | 
				
			||||||
    exit 1
 | 
					    exit 1
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
| 
						 | 
					@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set +e
 | 
					set +e
 | 
				
			||||||
alias die=''
 | 
					alias die=''
 | 
				
			||||||
if nc -zw1 8.8.8.8 443; then  msg_ok "Internet Connected"; else  msg_error "Internet NOT Connected"; exit 1; fi;
 | 
					if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else
 | 
				
			||||||
 | 
					  msg_error "Internet NOT Connected"
 | 
				
			||||||
 | 
					  exit 1
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs)
 | 
					RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs)
 | 
				
			||||||
if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure";  else msg_ok "DNS Resolved github.com to $RESOLVEDIP";  fi;
 | 
					if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi
 | 
				
			||||||
alias die='EXIT=$? LINE=$LINENO error_exit'
 | 
					alias die='EXIT=$? LINE=$LINENO error_exit'
 | 
				
			||||||
set -e
 | 
					set -e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -114,7 +116,7 @@ sudo systemctl start dashy &>/dev/null
 | 
				
			||||||
sudo systemctl enable dashy &>/dev/null
 | 
					sudo systemctl enable dashy &>/dev/null
 | 
				
			||||||
msg_ok "Created Service"
 | 
					msg_ok "Created Service"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PASS=$(grep -w "root" /etc/shadow | cut -b6);
 | 
					PASS=$(grep -w "root" /etc/shadow | cut -b6)
 | 
				
			||||||
if [[ $PASS != $ ]]; then
 | 
					if [[ $PASS != $ ]]; then
 | 
				
			||||||
  msg_info "Customizing Container"
 | 
					  msg_info "Customizing Container"
 | 
				
			||||||
  rm /etc/motd
 | 
					  rm /etc/motd
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,9 +1,9 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
RETRY_NUM=10
 | 
					RETRY_NUM=10
 | 
				
			||||||
RETRY_EVERY=3
 | 
					RETRY_EVERY=3
 | 
				
			||||||
NUM=$RETRY_NUM
 | 
					NUM=$RETRY_NUM
 | 
				
			||||||
| 
						 | 
					@ -46,12 +46,11 @@ msg_info "Setting up Container OS "
 | 
				
			||||||
sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
 | 
					sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
 | 
				
			||||||
locale-gen >/dev/null
 | 
					locale-gen >/dev/null
 | 
				
			||||||
while [ "$(hostname -I)" = "" ]; do
 | 
					while [ "$(hostname -I)" = "" ]; do
 | 
				
			||||||
  1>&2 echo -en "${CROSS}${RD} No Network! "
 | 
					  echo 1>&2 -en "${CROSS}${RD} No Network! "
 | 
				
			||||||
  sleep $RETRY_EVERY
 | 
					  sleep $RETRY_EVERY
 | 
				
			||||||
  ((NUM--))
 | 
					  ((NUM--))
 | 
				
			||||||
  if [ $NUM -eq 0 ]
 | 
					  if [ $NUM -eq 0 ]; then
 | 
				
			||||||
  then
 | 
					    echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
 | 
				
			||||||
    1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"    
 | 
					 | 
				
			||||||
    exit 1
 | 
					    exit 1
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
| 
						 | 
					@ -60,9 +59,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set +e
 | 
					set +e
 | 
				
			||||||
alias die=''
 | 
					alias die=''
 | 
				
			||||||
if nc -zw1 8.8.8.8 443; then  msg_ok "Internet Connected"; else  msg_error "Internet NOT Connected"; exit 1; fi;
 | 
					if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else
 | 
				
			||||||
 | 
					  msg_error "Internet NOT Connected"
 | 
				
			||||||
 | 
					  exit 1
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs)
 | 
					RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs)
 | 
				
			||||||
if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure";  else msg_ok "DNS Resolved github.com to $RESOLVEDIP";  fi;
 | 
					if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi
 | 
				
			||||||
alias die='EXIT=$? LINE=$LINENO error_exit'
 | 
					alias die='EXIT=$? LINE=$LINENO error_exit'
 | 
				
			||||||
set -e
 | 
					set -e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -76,7 +78,7 @@ apt-get install -y curl &>/dev/null
 | 
				
			||||||
apt-get install -y sudo &>/dev/null
 | 
					apt-get install -y sudo &>/dev/null
 | 
				
			||||||
msg_ok "Installed Dependencies"
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PASS=$(grep -w "root" /etc/shadow | cut -b6);
 | 
					PASS=$(grep -w "root" /etc/shadow | cut -b6)
 | 
				
			||||||
if [[ $PASS != $ ]]; then
 | 
					if [[ $PASS != $ ]]; then
 | 
				
			||||||
  msg_info "Customizing Container"
 | 
					  msg_info "Customizing Container"
 | 
				
			||||||
  chmod -x /etc/update-motd.d/*
 | 
					  chmod -x /etc/update-motd.d/*
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,9 +1,9 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
RETRY_NUM=10
 | 
					RETRY_NUM=10
 | 
				
			||||||
RETRY_EVERY=3
 | 
					RETRY_EVERY=3
 | 
				
			||||||
NUM=$RETRY_NUM
 | 
					NUM=$RETRY_NUM
 | 
				
			||||||
| 
						 | 
					@ -47,12 +47,11 @@ msg_info "Setting up Container OS "
 | 
				
			||||||
sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
 | 
					sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
 | 
				
			||||||
locale-gen >/dev/null
 | 
					locale-gen >/dev/null
 | 
				
			||||||
while [ "$(hostname -I)" = "" ]; do
 | 
					while [ "$(hostname -I)" = "" ]; do
 | 
				
			||||||
  1>&2 echo -en "${CROSS}${RD} No Network! "
 | 
					  echo 1>&2 -en "${CROSS}${RD} No Network! "
 | 
				
			||||||
  sleep $RETRY_EVERY
 | 
					  sleep $RETRY_EVERY
 | 
				
			||||||
  ((NUM--))
 | 
					  ((NUM--))
 | 
				
			||||||
  if [ $NUM -eq 0 ]
 | 
					  if [ $NUM -eq 0 ]; then
 | 
				
			||||||
  then
 | 
					    echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
 | 
				
			||||||
    1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"    
 | 
					 | 
				
			||||||
    exit 1
 | 
					    exit 1
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
| 
						 | 
					@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set +e
 | 
					set +e
 | 
				
			||||||
alias die=''
 | 
					alias die=''
 | 
				
			||||||
if nc -zw1 8.8.8.8 443; then  msg_ok "Internet Connected"; else  msg_error "Internet NOT Connected"; exit 1; fi;
 | 
					if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else
 | 
				
			||||||
 | 
					  msg_error "Internet NOT Connected"
 | 
				
			||||||
 | 
					  exit 1
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs)
 | 
					RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs)
 | 
				
			||||||
if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure";  else msg_ok "DNS Resolved github.com to $RESOLVEDIP";  fi;
 | 
					if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi
 | 
				
			||||||
alias die='EXIT=$? LINE=$LINENO error_exit'
 | 
					alias die='EXIT=$? LINE=$LINENO error_exit'
 | 
				
			||||||
set -e
 | 
					set -e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -108,7 +110,7 @@ systemctl start deconz
 | 
				
			||||||
systemctl enable deconz &>/dev/null
 | 
					systemctl enable deconz &>/dev/null
 | 
				
			||||||
msg_ok "Created Service"
 | 
					msg_ok "Created Service"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PASS=$(grep -w "root" /etc/shadow | cut -b6);
 | 
					PASS=$(grep -w "root" /etc/shadow | cut -b6)
 | 
				
			||||||
if [[ $PASS != $ ]]; then
 | 
					if [[ $PASS != $ ]]; then
 | 
				
			||||||
  msg_info "Customizing Container"
 | 
					  msg_info "Customizing Container"
 | 
				
			||||||
  chmod -x /etc/update-motd.d/*
 | 
					  chmod -x /etc/update-motd.d/*
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,9 +1,9 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
YW=`echo "\033[33m"`
 | 
					YW=$(echo "\033[33m")
 | 
				
			||||||
RD=`echo "\033[01;31m"`
 | 
					RD=$(echo "\033[01;31m")
 | 
				
			||||||
BL=`echo "\033[36m"`
 | 
					BL=$(echo "\033[36m")
 | 
				
			||||||
GN=`echo "\033[1;92m"`
 | 
					GN=$(echo "\033[1;92m")
 | 
				
			||||||
CL=`echo "\033[m"`
 | 
					CL=$(echo "\033[m")
 | 
				
			||||||
RETRY_NUM=10
 | 
					RETRY_NUM=10
 | 
				
			||||||
RETRY_EVERY=3
 | 
					RETRY_EVERY=3
 | 
				
			||||||
NUM=$RETRY_NUM
 | 
					NUM=$RETRY_NUM
 | 
				
			||||||
| 
						 | 
					@ -47,12 +47,11 @@ msg_info "Setting up Container OS "
 | 
				
			||||||
sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
 | 
					sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
 | 
				
			||||||
locale-gen >/dev/null
 | 
					locale-gen >/dev/null
 | 
				
			||||||
while [ "$(hostname -I)" = "" ]; do
 | 
					while [ "$(hostname -I)" = "" ]; do
 | 
				
			||||||
  1>&2 echo -en "${CROSS}${RD} No Network! "
 | 
					  echo 1>&2 -en "${CROSS}${RD} No Network! "
 | 
				
			||||||
  sleep $RETRY_EVERY
 | 
					  sleep $RETRY_EVERY
 | 
				
			||||||
  ((NUM--))
 | 
					  ((NUM--))
 | 
				
			||||||
  if [ $NUM -eq 0 ]
 | 
					  if [ $NUM -eq 0 ]; then
 | 
				
			||||||
  then
 | 
					    echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
 | 
				
			||||||
    1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"    
 | 
					 | 
				
			||||||
    exit 1
 | 
					    exit 1
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
| 
						 | 
					@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set +e
 | 
					set +e
 | 
				
			||||||
alias die=''
 | 
					alias die=''
 | 
				
			||||||
if nc -zw1 8.8.8.8 443; then  msg_ok "Internet Connected"; else  msg_error "Internet NOT Connected"; exit 1; fi;
 | 
					if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else
 | 
				
			||||||
 | 
					  msg_error "Internet NOT Connected"
 | 
				
			||||||
 | 
					  exit 1
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs)
 | 
					RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs)
 | 
				
			||||||
if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure";  else msg_ok "DNS Resolved github.com to $RESOLVEDIP";  fi;
 | 
					if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi
 | 
				
			||||||
alias die='EXIT=$? LINE=$LINENO error_exit'
 | 
					alias die='EXIT=$? LINE=$LINENO error_exit'
 | 
				
			||||||
set -e
 | 
					set -e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -97,8 +99,7 @@ sh <(curl -sSL https://get.docker.com) &>/dev/null
 | 
				
			||||||
msg_ok "Installed Docker $DOCKER_LATEST_VERSION"
 | 
					msg_ok "Installed Docker $DOCKER_LATEST_VERSION"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to add Portainer? <y/N> " prompt
 | 
					read -r -p "Would you like to add Portainer? <y/N> " prompt
 | 
				
			||||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
 | 
					if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
 | 
				
			||||||
then
 | 
					 | 
				
			||||||
  PORTAINER="Y"
 | 
					  PORTAINER="Y"
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
  PORTAINER="N"
 | 
					  PORTAINER="N"
 | 
				
			||||||
| 
						 | 
					@ -119,8 +120,7 @@ msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to add Docker Compose? <y/N> " prompt
 | 
					read -r -p "Would you like to add Docker Compose? <y/N> " prompt
 | 
				
			||||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
 | 
					if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
 | 
				
			||||||
then
 | 
					 | 
				
			||||||
  DOCKER_COMPOSE="Y"
 | 
					  DOCKER_COMPOSE="Y"
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
  DOCKER_COMPOSE="N"
 | 
					  DOCKER_COMPOSE="N"
 | 
				
			||||||
| 
						 | 
					@ -135,7 +135,7 @@ msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION"
 | 
				
			||||||
  msg_ok "Installed Docker Compose $DOCKER_COMPOSE_LATEST_VERSION"
 | 
					  msg_ok "Installed Docker Compose $DOCKER_COMPOSE_LATEST_VERSION"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PASS=$(grep -w "root" /etc/shadow | cut -b6);
 | 
					PASS=$(grep -w "root" /etc/shadow | cut -b6)
 | 
				
			||||||
if [[ $PASS != $ ]]; then
 | 
					if [[ $PASS != $ ]]; then
 | 
				
			||||||
  msg_info "Customizing Container"
 | 
					  msg_info "Customizing Container"
 | 
				
			||||||
  rm /etc/motd
 | 
					  rm /etc/motd
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
		Reference in New Issue