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"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -117,51 +118,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -117,51 +118,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -117,51 +118,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -117,51 +118,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -117,51 +118,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -117,51 +118,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -116,51 +117,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -125,51 +126,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -117,51 +118,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -116,51 +117,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -116,51 +117,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -116,51 +117,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -116,51 +117,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -117,51 +118,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -116,51 +117,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -116,51 +117,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -117,51 +118,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -116,51 +117,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -116,51 +117,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -125,51 +126,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -117,51 +118,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -117,51 +118,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -116,51 +117,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -116,51 +117,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -116,51 +117,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -117,51 +118,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -116,51 +117,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -117,51 +118,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -117,51 +118,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -116,51 +117,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -116,51 +117,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -125,51 +126,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -117,51 +118,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -117,51 +118,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -117,51 +118,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -116,51 +117,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -116,51 +117,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -125,51 +126,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -120,51 +121,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -117,51 +118,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -116,51 +117,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -118,51 +119,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -116,51 +117,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -117,51 +118,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -125,51 +126,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -117,51 +118,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -116,51 +117,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -117,51 +118,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -116,51 +117,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -116,51 +117,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -117,51 +118,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -118,51 +119,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -117,51 +118,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -10,13 +10,13 @@ NSAPP=$(echo ${APP,,} | tr -d ' ')
|
|||
var_install="${NSAPP}-install"
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
INTEGER='^[0-9]+$'
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
PW="-password $PW1"
|
||||
|
@ -117,51 +118,72 @@ else
|
|||
fi
|
||||
CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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 [ $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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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
|
||||
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
|
||||
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=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
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)
|
||||
exitstatus=$?
|
||||
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}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
IP=$(hostname -I | awk '{print $1}')
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
CM="${GN}✓${CL}"
|
||||
|
@ -66,9 +66,9 @@ apt-get install -y sudo &>/dev/null
|
|||
apt-get install -y git &>/dev/null
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
VERSION=$(curl -s https://api.github.com/repos/coder/code-server/releases/latest \
|
||||
| grep "tag_name" \
|
||||
| awk '{print substr($2, 3, length($2)-4) }') \
|
||||
VERSION=$(curl -s https://api.github.com/repos/coder/code-server/releases/latest |
|
||||
grep "tag_name" |
|
||||
awk '{print substr($2, 3, length($2)-4) }')
|
||||
|
||||
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
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
clear
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
CM="${GN}✓${CL}"
|
||||
|
@ -46,10 +46,12 @@ function msg_error() {
|
|||
local msg="$1"
|
||||
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
|
||||
if [ -d "$DIR" ];
|
||||
then
|
||||
if [ -d "$DIR" ]; then
|
||||
msg_ok "Restore Directory Exists."
|
||||
else
|
||||
mkdir -p /var/lib/docker/volumes/hass_config/_data/restore
|
||||
|
@ -58,7 +60,10 @@ fi
|
|||
cd /var/lib/docker/volumes/hass_config/_data/backups/
|
||||
PS3="Please enter your choice: "
|
||||
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"
|
||||
docker stop homeassistant &>/dev/null
|
||||
msg_ok "Stopped Home Assistant"
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
clear
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
CM="${GN}✓${CL}"
|
||||
|
@ -46,10 +46,12 @@ function msg_error() {
|
|||
local msg="$1"
|
||||
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
|
||||
if [ -d "$DIR" ];
|
||||
then
|
||||
if [ -d "$DIR" ]; then
|
||||
msg_ok "Restore Directory Exists."
|
||||
else
|
||||
mkdir -p /root/.homeassistant/restore
|
||||
|
@ -58,7 +60,10 @@ fi
|
|||
cd /root/.homeassistant/backups/
|
||||
PS3="Please enter your choice: "
|
||||
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"
|
||||
sudo service homeassistant stop
|
||||
msg_ok "Stopped Home Assistant"
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
CM="${GN}✓${CL}"
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
clear
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
CM='\xE2\x9C\x94\033'
|
||||
GN=`echo "\033[1;92m"`
|
||||
CL=`echo "\033[m"`
|
||||
GN=$(echo "\033[1;92m")
|
||||
CL=$(echo "\033[m")
|
||||
while true; do
|
||||
read -p "This will Update Dashy LXC. Proceed(y/n)?" yn
|
||||
case $yn in
|
||||
|
|
|
@ -16,12 +16,12 @@ done
|
|||
clear
|
||||
|
||||
show_menu() {
|
||||
normal=`echo "\033[m"`
|
||||
safe=`echo "\033[32m"`
|
||||
menu=`echo "\033[36m"`
|
||||
number=`echo "\033[33m"`
|
||||
bgred=`echo "\033[41m"`
|
||||
fgred=`echo "\033[31m"`
|
||||
normal=$(echo "\033[m")
|
||||
safe=$(echo "\033[32m")
|
||||
menu=$(echo "\033[36m")
|
||||
number=$(echo "\033[33m")
|
||||
bgred=$(echo "\033[41m")
|
||||
fgred=$(echo "\033[31m")
|
||||
proxmox-boot-tool kernel list
|
||||
echo -e "\nCurrent Kernel: ${menu}${KERNEL_ON}${normal}"
|
||||
printf "\n${menu}*********************************************${normal}\n"
|
||||
|
@ -35,20 +35,20 @@ show_menu(){
|
|||
read opt
|
||||
}
|
||||
option_picked() {
|
||||
msgcolor=`echo "\033[01;31m"`
|
||||
normal=`echo "\033[00;00m"`
|
||||
msgcolor=$(echo "\033[01;31m")
|
||||
normal=$(echo "\033[00;00m")
|
||||
message=${@:-"${normal}Error: No message passed"}
|
||||
printf "${msgcolor}${message}${normal}\n"
|
||||
}
|
||||
clear
|
||||
show_menu
|
||||
while [ $opt != '' ]
|
||||
do
|
||||
while [ $opt != '' ]; do
|
||||
if [ $opt = '' ]; then
|
||||
exit;
|
||||
exit
|
||||
else
|
||||
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
|
||||
case $yn in
|
||||
[Yy]*) break ;;
|
||||
|
@ -56,17 +56,18 @@ while [ $opt != '' ]
|
|||
*) echo "Please answer yes or no." ;;
|
||||
esac
|
||||
done
|
||||
clear;
|
||||
option_picked "Installing Proxmox Edge Kernel & Rebooting";
|
||||
clear
|
||||
option_picked "Installing Proxmox Edge Kernel & Rebooting"
|
||||
apt-get install -y gnupg
|
||||
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
|
||||
apt-get -y update
|
||||
apt-get -y install pve-kernel-5.19-edge
|
||||
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
|
||||
case $yn in
|
||||
[Yy]*) break ;;
|
||||
|
@ -74,13 +75,14 @@ while [ $opt != '' ]
|
|||
*) echo "Please answer yes or no." ;;
|
||||
esac
|
||||
done
|
||||
clear;
|
||||
option_picked "Switching to Proxmox VE 7 Kernel & Rebooting";
|
||||
clear
|
||||
option_picked "Switching to Proxmox VE 7 Kernel & Rebooting"
|
||||
proxmox-boot-tool kernel pin ${PVE_KERNEL}
|
||||
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
|
||||
case $yn in
|
||||
[Yy]*) break ;;
|
||||
|
@ -88,13 +90,14 @@ while [ $opt != '' ]
|
|||
*) echo "Please answer yes or no." ;;
|
||||
esac
|
||||
done
|
||||
clear;
|
||||
option_picked "Switching to Proxmox Edge Kernel & Rebooting";
|
||||
clear
|
||||
option_picked "Switching to Proxmox Edge Kernel & Rebooting"
|
||||
proxmox-boot-tool kernel pin ${EDGE_KERNEL}
|
||||
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
|
||||
case $yn in
|
||||
[Yy]*) break ;;
|
||||
|
@ -102,13 +105,14 @@ while [ $opt != '' ]
|
|||
*) echo "Please answer yes or no." ;;
|
||||
esac
|
||||
done
|
||||
clear;
|
||||
option_picked "Unpinning Current Kernel";
|
||||
clear
|
||||
option_picked "Unpinning Current Kernel"
|
||||
proxmox-boot-tool kernel unpin
|
||||
clear;
|
||||
break;
|
||||
clear
|
||||
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
|
||||
case $yn in
|
||||
[Yy]*) break ;;
|
||||
|
@ -116,21 +120,24 @@ while [ $opt != '' ]
|
|||
*) echo "Please answer yes or no." ;;
|
||||
esac
|
||||
done
|
||||
clear;
|
||||
option_picked "Removing Proxmox Edge Kernel & Rebooting";
|
||||
clear
|
||||
option_picked "Removing Proxmox Edge Kernel & Rebooting"
|
||||
apt-get purge -y ${EDGE_KERNEL}
|
||||
rm -rf /etc/apt/sources.list.d/pve-edge-kernel.list
|
||||
proxmox-boot-tool kernel unpin
|
||||
reboot
|
||||
break;
|
||||
break
|
||||
;;
|
||||
x)exit;
|
||||
x)
|
||||
exit
|
||||
;;
|
||||
\n)exit;
|
||||
\n)
|
||||
exit
|
||||
;;
|
||||
*)clear;
|
||||
option_picked "Please choose an option from the menu";
|
||||
show_menu;
|
||||
*)
|
||||
clear
|
||||
option_picked "Please choose an option from the menu"
|
||||
show_menu
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
CM="${GN}✓${CL}"
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
IP=$(hostname -I | awk '{print $1}')
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
CM="${GN}✓${CL}"
|
||||
|
|
|
@ -73,9 +73,9 @@ while [ -z "${CTID_TO:+x}" ]; do
|
|||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||
done
|
||||
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_MENU[$i]}" == "$CTID_TO" ] && \
|
||||
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
||||
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
||||
done
|
||||
whiptail --defaultno --title "$TITLE" --yesno \
|
||||
|
@ -90,13 +90,13 @@ fi
|
|||
msg "Mounting Container Disks..."
|
||||
DOCKER_PATH=/var/lib/docker/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}'."
|
||||
[ -d "${CTID_FROM_PATH}${DOCKER_PATH}" ] || \
|
||||
[ -d "${CTID_FROM_PATH}${DOCKER_PATH}" ] ||
|
||||
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}'."
|
||||
[ -d "${CTID_TO_PATH}${PODMAN_PATH}" ] || \
|
||||
[ -d "${CTID_TO_PATH}${PODMAN_PATH}" ] ||
|
||||
die "Home Assistant directories in '$CTID_TO' not found."
|
||||
|
||||
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
|
||||
done
|
||||
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_MENU[$i]}" == "$CTID_TO" ] && \
|
||||
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
||||
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
||||
done
|
||||
whiptail --defaultno --title "$TITLE" --yesno \
|
||||
|
@ -89,13 +89,13 @@ if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then
|
|||
fi
|
||||
msg "Mounting Container Disks..."
|
||||
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}'."
|
||||
[ -d "${CTID_FROM_PATH}${DOCKER_PATH}" ] || \
|
||||
[ -d "${CTID_FROM_PATH}${DOCKER_PATH}" ] ||
|
||||
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}'."
|
||||
[ -d "${CTID_TO_PATH}${DOCKER_PATH}" ] || \
|
||||
[ -d "${CTID_TO_PATH}${DOCKER_PATH}" ] ||
|
||||
die "Home Assistant directories in '$CTID_TO' not found."
|
||||
|
||||
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
|
||||
done
|
||||
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_MENU[$i]}" == "$CTID_TO" ] && \
|
||||
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
||||
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
||||
done
|
||||
whiptail --defaultno --title "$TITLE" --yesno \
|
||||
|
@ -87,13 +87,13 @@ fi
|
|||
msg "Mounting Container Disks..."
|
||||
DOCKER_PATH=/var/lib/docker/volumes/hass_config/_data
|
||||
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}'."
|
||||
[ -d "${CTID_FROM_PATH}${DOCKER_PATH}" ] || \
|
||||
[ -d "${CTID_FROM_PATH}${DOCKER_PATH}" ] ||
|
||||
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}'."
|
||||
[ -d "${CTID_TO_PATH}${CORE_PATH}" ] || \
|
||||
[ -d "${CTID_TO_PATH}${CORE_PATH}" ] ||
|
||||
die "Home Assistant directories in '$CTID_TO' not found."
|
||||
|
||||
msg "Copying Data..."
|
||||
|
|
|
@ -70,9 +70,9 @@ while [ -z "${CTID_TO:+x}" ]; do
|
|||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||
done
|
||||
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_MENU[$i]}" == "$CTID_TO" ] && \
|
||||
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
||||
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
||||
done
|
||||
whiptail --defaultno --title "$TITLE" --yesno \
|
||||
|
@ -87,13 +87,13 @@ fi
|
|||
msg "Mounting Container Disks..."
|
||||
DOCKER_PATH=/var/lib/docker/volumes/hass_config/_data
|
||||
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}'."
|
||||
[ -d "${CTID_FROM_PATH}${CORE_PATH}" ] || \
|
||||
[ -d "${CTID_FROM_PATH}${CORE_PATH}" ] ||
|
||||
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}'."
|
||||
[ -d "${CTID_TO_PATH}${DOCKER_PATH}" ] || \
|
||||
[ -d "${CTID_TO_PATH}${DOCKER_PATH}" ] ||
|
||||
die "Home Assistant directories in '$CTID_TO' not found."
|
||||
|
||||
msg "Copying Data..."
|
||||
|
|
|
@ -66,9 +66,9 @@ while [ -z "${CTID_TO:+x}" ]; do
|
|||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||
done
|
||||
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_MENU[$i]}" == "$CTID_TO" ] && \
|
||||
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
||||
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
||||
done
|
||||
whiptail --defaultno --title "$TITLE" --yesno \
|
||||
|
@ -83,13 +83,13 @@ fi
|
|||
msg "Mounting Container Disks..."
|
||||
DOCKER_PATH=/var/lib/docker/volumes/hass_config/_data
|
||||
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}'."
|
||||
[ -d "${CTID_FROM_PATH}${CORE_PATH}" ] || \
|
||||
[ -d "${CTID_FROM_PATH}${CORE_PATH}" ] ||
|
||||
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}'."
|
||||
[ -d "${CTID_TO_PATH}${CORE_PATH}" ] || \
|
||||
[ -d "${CTID_TO_PATH}${CORE_PATH}" ] ||
|
||||
die "Home Assistant directories in '$CTID_TO' not found."
|
||||
|
||||
msg "Copying Data..."
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
PP=`echo "\e[1;35m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BL=`echo "\033[36m"`
|
||||
PP=$(echo "\e[1;35m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BL=$(echo "\033[36m")
|
||||
CM='\xE2\x9C\x94\033'
|
||||
GN=`echo "\033[1;92m"`
|
||||
CL=`echo "\033[m"`
|
||||
GN=$(echo "\033[1;92m")
|
||||
CL=$(echo "\033[m")
|
||||
while true; do
|
||||
read -p "This will Update Heimdall Dashboard. Proceed(y/n)?" yn
|
||||
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}... "
|
||||
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
|
||||
VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest \
|
||||
| grep "tag_name" \
|
||||
| awk '{print substr($2, 3, length($2)-4) }')
|
||||
VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest |
|
||||
grep "tag_name" |
|
||||
awk '{print substr($2, 3, length($2)-4) }')
|
||||
|
||||
if [ ! -d "/opt/Heimdall" ]; then
|
||||
mv Heimdall-${VER} /opt/Heimdall
|
||||
|
@ -116,4 +116,3 @@ sleep 2
|
|||
echo -e "${CM}${CL} \r"
|
||||
|
||||
echo -en "${GN} Finished! ${CL}\n"
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
CM="${GN}✓${CL}"
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#!/usr/bin/env bash -ex
|
||||
set -euo pipefail
|
||||
shopt -s inherit_errexit nullglob
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
CM="${GN}✓${CL}"
|
||||
|
@ -82,8 +82,7 @@ function kernel_info() {
|
|||
function kernel_clean() {
|
||||
kernels=$(dpkg --list | grep 'kernel-.*-pve' | awk '{print $2}' | sort -V)
|
||||
remove_kernels=""
|
||||
for kernel in $kernels
|
||||
do
|
||||
for kernel in $kernels; do
|
||||
if [ "$(echo $kernel | grep $current_kernel)" ]; then
|
||||
break
|
||||
else
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest \
|
||||
| grep "tag_name" \
|
||||
| awk '{print substr($2, 3, length($2)-4) }')
|
||||
RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest |
|
||||
grep "tag_name" |
|
||||
awk '{print substr($2, 3, length($2)-4) }')
|
||||
|
||||
RD=`echo "\033[01;31m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=$(echo "\033[01;31m")
|
||||
BL=$(echo "\033[36m")
|
||||
CM='\xE2\x9C\x94\033'
|
||||
GN=`echo "\033[1;92m"`
|
||||
CL=`echo "\033[m"`
|
||||
GN=$(echo "\033[1;92m")
|
||||
CL=$(echo "\033[m")
|
||||
function update_info {
|
||||
cat <<"EOF"
|
||||
_ __ _ __
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
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
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||
then
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
reboot=yes
|
||||
else
|
||||
reboot=no
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
# bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/misc/node-red-themes.sh)"
|
||||
set -o errexit
|
||||
show_menu() {
|
||||
YW=`echo "\033[33m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BL=`echo "\033[36m"`
|
||||
YW=$(echo "\033[33m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BL=$(echo "\033[36m")
|
||||
CM='\xE2\x9C\x94\033'
|
||||
GN=`echo "\033[1;92m"`
|
||||
CL=`echo "\033[m"`
|
||||
GN=$(echo "\033[1;92m")
|
||||
CL=$(echo "\033[m")
|
||||
echo -e "${RD} Backup your Node-Red flows before running this script!!${CL} \n "
|
||||
while true; do
|
||||
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() {
|
||||
msgcolor=`echo "\033[01;31m"`
|
||||
normal=`echo "\033[00;00m"`
|
||||
msgcolor=$(echo "\033[01;31m")
|
||||
normal=$(echo "\033[00;00m")
|
||||
message=${@:-"${CL}Error: No message passed"}
|
||||
printf "${RD}${message}${CL}\n"
|
||||
}
|
||||
|
||||
clear
|
||||
show_menu
|
||||
while [ "$opt" != " " ]
|
||||
do
|
||||
while [ "$opt" != " " ]; do
|
||||
case $opt in
|
||||
1) clear;
|
||||
option_picked "Installing Default Theme";
|
||||
1)
|
||||
clear
|
||||
option_picked "Installing Default Theme"
|
||||
THEME=
|
||||
JS=//
|
||||
break;
|
||||
break
|
||||
;;
|
||||
2) clear;
|
||||
option_picked "Installing Dark Theme";
|
||||
2)
|
||||
clear
|
||||
option_picked "Installing Dark Theme"
|
||||
THEME=dark
|
||||
break;
|
||||
break
|
||||
;;
|
||||
3) clear;
|
||||
option_picked "Installing Dracula Theme";
|
||||
3)
|
||||
clear
|
||||
option_picked "Installing Dracula Theme"
|
||||
THEME=dracula
|
||||
break;
|
||||
break
|
||||
;;
|
||||
4) clear;
|
||||
option_picked "Installing Midnight-Red Theme";
|
||||
4)
|
||||
clear
|
||||
option_picked "Installing Midnight-Red Theme"
|
||||
THEME=midnight-red
|
||||
break;
|
||||
break
|
||||
;;
|
||||
5) clear;
|
||||
option_picked "Installing Oled Theme";
|
||||
5)
|
||||
clear
|
||||
option_picked "Installing Oled Theme"
|
||||
THEME=oled
|
||||
break;
|
||||
break
|
||||
;;
|
||||
6) clear;
|
||||
option_picked "Installing Solarized-Dark Theme";
|
||||
6)
|
||||
clear
|
||||
option_picked "Installing Solarized-Dark Theme"
|
||||
THEME=solarized-dark
|
||||
break;
|
||||
break
|
||||
;;
|
||||
7) clear;
|
||||
option_picked "Installing Solarized-Light Theme";
|
||||
7)
|
||||
clear
|
||||
option_picked "Installing Solarized-Light Theme"
|
||||
THEME=solarized-light
|
||||
break;
|
||||
break
|
||||
;;
|
||||
|
||||
x)exit;
|
||||
x)
|
||||
exit
|
||||
;;
|
||||
\n)exit;
|
||||
\n)
|
||||
exit
|
||||
;;
|
||||
*)clear;
|
||||
option_picked "Please choose a theme from the menu";
|
||||
show_menu;
|
||||
*)
|
||||
clear
|
||||
option_picked "Please choose a theme from the menu"
|
||||
show_menu
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest \
|
||||
| grep "tag_name" \
|
||||
| awk '{print substr($2, 3, length($2)-4) }') \
|
||||
RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest |
|
||||
grep "tag_name" |
|
||||
awk '{print substr($2, 3, length($2)-4) }')
|
||||
|
||||
RD=`echo "\033[01;31m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=$(echo "\033[01;31m")
|
||||
BL=$(echo "\033[36m")
|
||||
CM='\xE2\x9C\x94\033'
|
||||
GN=`echo "\033[1;92m"`
|
||||
CL=`echo "\033[m"`
|
||||
GN=$(echo "\033[1;92m")
|
||||
CL=$(echo "\033[m")
|
||||
|
||||
function update_info {
|
||||
echo -e "${RD}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
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) }')
|
||||
YW=`echo "\033[33m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BL=`echo "\033[36m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BL=$(echo "\033[36m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
CL=$(echo "\033[m")
|
||||
RETRY_NUM=10
|
||||
RETRY_EVERY=3
|
||||
NUM=$RETRY_NUM
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
RELEASE=$(curl -s https://api.github.com/repos/photoprism/photoprism/releases/latest \
|
||||
| grep "tag_name" \
|
||||
| awk '{print substr($2, 2, length($2)-4) }') \
|
||||
RELEASE=$(curl -s https://api.github.com/repos/photoprism/photoprism/releases/latest |
|
||||
grep "tag_name" |
|
||||
awk '{print substr($2, 2, length($2)-4) }')
|
||||
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
CM='\xE2\x9C\x94\033'
|
||||
GN=`echo "\033[1;92m"`
|
||||
CL=`echo "\033[m"`
|
||||
PP=`echo "\e[1;35m"`
|
||||
GN=$(echo "\033[1;92m")
|
||||
CL=$(echo "\033[m")
|
||||
PP=$(echo "\e[1;35m")
|
||||
|
||||
while true; do
|
||||
read -p "Update PhotoPrism LXC. Proceed(y/n)?" yn
|
||||
|
@ -47,29 +47,33 @@ option_picked(){
|
|||
printf " ${YW}${message1}${CL}\n"
|
||||
}
|
||||
show_menu
|
||||
while [ "$opt" != " " ]
|
||||
do
|
||||
while [ "$opt" != " " ]; do
|
||||
case $opt in
|
||||
1) clear;
|
||||
header_info;
|
||||
option_picked "Using Release Branch";
|
||||
1)
|
||||
clear
|
||||
header_info
|
||||
option_picked "Using Release Branch"
|
||||
BR="release"
|
||||
break;
|
||||
break
|
||||
;;
|
||||
2) clear;
|
||||
header_info;
|
||||
option_picked "Using Develop Branch";
|
||||
2)
|
||||
clear
|
||||
header_info
|
||||
option_picked "Using Develop Branch"
|
||||
BR="develop"
|
||||
break;
|
||||
break
|
||||
;;
|
||||
|
||||
x)exit;
|
||||
x)
|
||||
exit
|
||||
;;
|
||||
\n)exit;
|
||||
\n)
|
||||
exit
|
||||
;;
|
||||
*)clear;
|
||||
option_picked "Please choose a Install Branch from the menu";
|
||||
show_menu;
|
||||
*)
|
||||
clear
|
||||
option_picked "Please choose a Install Branch from the menu"
|
||||
show_menu
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
@ -100,5 +104,3 @@ sudo systemctl start photoprism
|
|||
echo -e "${CM}${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
|
||||
done
|
||||
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_MENU[$i]}" == "$CTID_TO" ] && \
|
||||
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
||||
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
||||
done
|
||||
whiptail --defaultno --title "$TITLE" --yesno \
|
||||
|
@ -89,13 +89,13 @@ if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then
|
|||
fi
|
||||
msg "Mounting Container Disks..."
|
||||
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}'."
|
||||
[ -d "${CTID_FROM_PATH}${DATA_PATH}" ] || \
|
||||
[ -d "${CTID_FROM_PATH}${DATA_PATH}" ] ||
|
||||
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}'."
|
||||
[ -d "${CTID_TO_PATH}${DATA_PATH}" ] || \
|
||||
[ -d "${CTID_TO_PATH}${DATA_PATH}" ] ||
|
||||
die "Plex Media Server directories in '$CTID_TO' not found."
|
||||
|
||||
#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
|
||||
done
|
||||
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_MENU[$i]}" == "$CTID_TO" ] && \
|
||||
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
||||
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
||||
done
|
||||
whiptail --defaultno --title "$TITLE" --yesno \
|
||||
|
@ -90,13 +90,13 @@ fi
|
|||
msg "Mounting Container Disks..."
|
||||
DOCKER_PATH=/var/lib/docker/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}'."
|
||||
[ -d "${CTID_FROM_PATH}${PODMAN_PATH}" ] || \
|
||||
[ -d "${CTID_FROM_PATH}${PODMAN_PATH}" ] ||
|
||||
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}'."
|
||||
[ -d "${CTID_TO_PATH}${DOCKER_PATH}" ] || \
|
||||
[ -d "${CTID_TO_PATH}${DOCKER_PATH}" ] ||
|
||||
die "Home Assistant directories in '$CTID_TO' not found."
|
||||
|
||||
rm -rf ${CTID_TO_PATH}${DOCKER_PATH}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#!/usr/bin/env bash -ex
|
||||
set -euo pipefail
|
||||
shopt -s inherit_errexit nullglob
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
CM="${GN}✓${CL}"
|
||||
|
@ -52,8 +52,7 @@ function msg_ok() {
|
|||
clear
|
||||
header_info
|
||||
read -r -p "Disable Enterprise Repository? <y/N> " prompt
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
|
||||
then
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
|
||||
msg_info "Disabling Enterprise Repository"
|
||||
sleep 2
|
||||
sed -i "s/^deb/#deb/g" /etc/apt/sources.list.d/pbs-enterprise.list
|
||||
|
@ -61,8 +60,7 @@ msg_ok "Disabled Enterprise Repository"
|
|||
fi
|
||||
|
||||
read -r -p "Add/Correct PBS Sources (sources.list)? <y/N> " prompt
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
|
||||
then
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
|
||||
msg_info "Adding or Correcting PBS Sources"
|
||||
cat <<EOF >/etc/apt/sources.list
|
||||
deb http://ftp.debian.org/debian bullseye main contrib
|
||||
|
@ -74,8 +72,7 @@ msg_ok "Added or Corrected PBS Sources"
|
|||
fi
|
||||
|
||||
read -r -p "Enable No-Subscription Repository? <y/N> " prompt
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
|
||||
then
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
|
||||
msg_info "Enabling No-Subscription Repository"
|
||||
cat <<EOF >>/etc/apt/sources.list
|
||||
deb http://download.proxmox.com/debian/pbs bullseye pbs-no-subscription
|
||||
|
@ -85,8 +82,7 @@ msg_ok "Enabled No-Subscription Repository"
|
|||
fi
|
||||
|
||||
read -r -p "Add (Disabled) Beta/Test Repository? <y/N> " prompt
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
|
||||
then
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
|
||||
msg_info "Adding Beta/Test Repository and set disabled"
|
||||
cat <<EOF >>/etc/apt/sources.list
|
||||
# deb http://download.proxmox.com/debian/pbs bullseye pbstest
|
||||
|
@ -96,8 +92,7 @@ msg_ok "Added Beta/Test Repository"
|
|||
fi
|
||||
|
||||
read -r -p "Disable Subscription Nag? <y/N> " prompt
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
|
||||
then
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
|
||||
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
|
||||
apt --reinstall install proxmox-widget-toolkit &>/dev/null
|
||||
|
@ -105,8 +100,7 @@ msg_ok "Disabled Subscription Nag"
|
|||
fi
|
||||
|
||||
read -r -p "Update Proxmox Backup Server now? <y/N> " prompt
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
|
||||
then
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
|
||||
msg_info "Updating Proxmox Backup Server (Patience)"
|
||||
apt-get update &>/dev/null
|
||||
apt-get -y dist-upgrade &>/dev/null
|
||||
|
@ -114,8 +108,7 @@ msg_ok "Updated Proxmox Backup Server (⚠ Reboot Recommended)"
|
|||
fi
|
||||
|
||||
read -r -p "Reboot Proxmox Backup Server now? <y/N> " prompt
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
|
||||
then
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
|
||||
msg_info "Rebooting Proxmox Backup Server"
|
||||
sleep 2
|
||||
msg_ok "Completed Post Install Routines"
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#!/usr/bin/env bash -ex
|
||||
set -euo pipefail
|
||||
shopt -s inherit_errexit nullglob
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
CM="${GN}✓${CL}"
|
||||
|
@ -28,7 +28,7 @@ if ! command -v pveversion >/dev/null 2>&1; then
|
|||
exit 1
|
||||
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 "Requires PVE Version: 7.XX${CL}"
|
||||
echo -e "\nExiting..."
|
||||
|
@ -58,8 +58,7 @@ function msg_ok() {
|
|||
clear
|
||||
header_info
|
||||
read -r -p "Disable Enterprise Repository? <y/N> " prompt
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
|
||||
then
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
|
||||
msg_info "Disabling Enterprise Repository"
|
||||
sleep 2
|
||||
sed -i "s/^deb/#deb/g" /etc/apt/sources.list.d/pve-enterprise.list
|
||||
|
@ -67,8 +66,7 @@ msg_ok "Disabled Enterprise Repository"
|
|||
fi
|
||||
|
||||
read -r -p "Add/Correct PVE7 Sources (sources.list)? <y/N> " prompt
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
|
||||
then
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
|
||||
msg_info "Adding or Correcting PVE7 Sources"
|
||||
cat <<EOF >/etc/apt/sources.list
|
||||
deb http://ftp.debian.org/debian bullseye main contrib
|
||||
|
@ -80,8 +78,7 @@ msg_ok "Added or Corrected PVE7 Sources"
|
|||
fi
|
||||
|
||||
read -r -p "Enable No-Subscription Repository? <y/N> " prompt
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
|
||||
then
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
|
||||
msg_info "Enabling No-Subscription Repository"
|
||||
cat <<EOF >>/etc/apt/sources.list
|
||||
deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription
|
||||
|
@ -91,8 +88,7 @@ msg_ok "Enabled No-Subscription Repository"
|
|||
fi
|
||||
|
||||
read -r -p "Add (Disabled) Beta/Test Repository? <y/N> " prompt
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
|
||||
then
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
|
||||
msg_info "Adding Beta/Test Repository and set disabled"
|
||||
cat <<EOF >>/etc/apt/sources.list
|
||||
# deb http://download.proxmox.com/debian/pve bullseye pvetest
|
||||
|
@ -102,8 +98,7 @@ msg_ok "Added Beta/Test Repository"
|
|||
fi
|
||||
|
||||
read -r -p "Disable Subscription Nag? <y/N> " prompt
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
|
||||
then
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
|
||||
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
|
||||
apt --reinstall install proxmox-widget-toolkit &>/dev/null
|
||||
|
@ -111,8 +106,7 @@ msg_ok "Disabled Subscription Nag (Delete browser cache)"
|
|||
fi
|
||||
|
||||
read -r -p "Update Proxmox VE 7 now? <y/N> " prompt
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
|
||||
then
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
|
||||
msg_info "Updating Proxmox VE 7 (Patience)"
|
||||
apt-get update &>/dev/null
|
||||
apt-get -y dist-upgrade &>/dev/null
|
||||
|
@ -120,8 +114,7 @@ msg_ok "Updated Proxmox VE 7 (⚠ Reboot Recommended)"
|
|||
fi
|
||||
|
||||
read -r -p "Reboot Proxmox VE 7 now? <y/N> " prompt
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
|
||||
then
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
|
||||
msg_info "Rebooting Proxmox VE 7"
|
||||
sleep 2
|
||||
msg_ok "Completed Post Install Routines"
|
||||
|
|
|
@ -22,11 +22,11 @@ echo -e "
|
|||
"
|
||||
}
|
||||
show_menu() {
|
||||
CL=`echo "\033[m"`
|
||||
GN=`echo "\033[32m"`
|
||||
BL=`echo "\033[36m"`
|
||||
YW=`echo "\033[33m"`
|
||||
fgred=`echo "\033[31m"`
|
||||
CL=$(echo "\033[m")
|
||||
GN=$(echo "\033[32m")
|
||||
BL=$(echo "\033[36m")
|
||||
YW=$(echo "\033[33m")
|
||||
fgred=$(echo "\033[31m")
|
||||
header_info
|
||||
CK=$(uname -r)
|
||||
IP=$(hostname -I)
|
||||
|
@ -57,42 +57,50 @@ header_info
|
|||
}
|
||||
clear
|
||||
show_menu
|
||||
while [ $opt != '' ]
|
||||
do
|
||||
while [ $opt != '' ]; do
|
||||
if [ $opt = '' ]; then
|
||||
exit;
|
||||
exit
|
||||
else
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
show_menu
|
||||
;;
|
||||
x)exit;
|
||||
x)
|
||||
exit
|
||||
;;
|
||||
\n)exit;
|
||||
\n)
|
||||
exit
|
||||
;;
|
||||
*)clear;
|
||||
show_menu;
|
||||
*)
|
||||
clear
|
||||
show_menu
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
|
|
@ -14,30 +14,25 @@ echo "==============================="
|
|||
echo "Technitium DNS Server Update"
|
||||
echo "==============================="
|
||||
|
||||
if dotnet --list-runtimes 2> /dev/null | grep -q "Microsoft.NETCore.App 6.0.";
|
||||
then
|
||||
if dotnet --list-runtimes 2>/dev/null | grep -q "Microsoft.NETCore.App 6.0."; then
|
||||
dotnetFound="yes"
|
||||
else
|
||||
dotnetFound="no"
|
||||
fi
|
||||
|
||||
if [ -d $dotnetDir ]
|
||||
then
|
||||
if [ -d $dotnetDir ]; then
|
||||
dotnetUpdate="yes"
|
||||
echo "Updating .NET 6 Runtime..."
|
||||
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
|
||||
|
||||
if [ ! -f "/usr/bin/dotnet" ]
|
||||
then
|
||||
if [ ! -f "/usr/bin/dotnet" ]; then
|
||||
ln -s $dotnetDir/dotnet /usr/bin >>$installLog 2>&1
|
||||
fi
|
||||
|
||||
if dotnet --list-runtimes 2> /dev/null | grep -q "Microsoft.NETCore.App 6.0.";
|
||||
then
|
||||
if [ "$dotnetUpdate" = "yes" ]
|
||||
then
|
||||
if dotnet --list-runtimes 2>/dev/null | grep -q "Microsoft.NETCore.App 6.0."; then
|
||||
if [ "$dotnetUpdate" = "yes" ]; then
|
||||
echo ".NET 6 Runtime was updated successfully!"
|
||||
fi
|
||||
else
|
||||
|
@ -45,19 +40,15 @@ fi
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if curl -o $dnsTar --fail $dnsUrl >> $installLog 2>&1
|
||||
then
|
||||
if [ -d $dnsDir ]
|
||||
then
|
||||
if curl -o $dnsTar --fail $dnsUrl >>$installLog 2>&1; then
|
||||
if [ -d $dnsDir ]; then
|
||||
echo "Updating Technitium DNS Server..."
|
||||
fi
|
||||
|
||||
tar -zxf $dnsTar -C $dnsDir >>$installLog 2>&1
|
||||
|
||||
if [ "$(ps --no-headers -o comm 1 | tr -d '\n')" = "systemd" ]
|
||||
then
|
||||
if [ -f "/etc/systemd/system/dns.service" ]
|
||||
then
|
||||
if [ "$(ps --no-headers -o comm 1 | tr -d '\n')" = "systemd" ]; then
|
||||
if [ -f "/etc/systemd/system/dns.service" ]; then
|
||||
echo "Restarting systemd service..."
|
||||
systemctl restart dns.service >>$installLog 2>&1
|
||||
fi
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
RELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest \
|
||||
| grep "tag_name" \
|
||||
| awk '{print substr($2, 3, length($2)-4) }')
|
||||
RELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest |
|
||||
grep "tag_name" |
|
||||
awk '{print substr($2, 3, length($2)-4) }')
|
||||
|
||||
RD=`echo "\033[01;31m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=$(echo "\033[01;31m")
|
||||
BL=$(echo "\033[36m")
|
||||
CM='\xE2\x9C\x94\033'
|
||||
GN=`echo "\033[1;92m"`
|
||||
CL=`echo "\033[m"`
|
||||
GN=$(echo "\033[1;92m")
|
||||
CL=$(echo "\033[m")
|
||||
function update_info {
|
||||
cat <<"EOF"
|
||||
______ _ ___
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
CM='\xE2\x9C\x94\033'
|
||||
GN=`echo "\033[1;92m"`
|
||||
CL=`echo "\033[m"`
|
||||
GN=$(echo "\033[1;92m")
|
||||
CL=$(echo "\033[m")
|
||||
APP="UniFi Update"
|
||||
while true; do
|
||||
read -p "This will run ${APP}. Proceed(y/n)?" yn
|
||||
|
@ -30,4 +30,3 @@ ${CL}"
|
|||
header_info
|
||||
sleep 3
|
||||
wget -qL https://get.glennr.nl/unifi/update/unifi-update.sh && bash unifi-update.sh
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
CM='\xE2\x9C\x94\033'
|
||||
GN=`echo "\033[1;92m"`
|
||||
CL=`echo "\033[m"`
|
||||
GN=$(echo "\033[1;92m")
|
||||
CL=$(echo "\033[m")
|
||||
while true; do
|
||||
read -p "This Will Update All LXC Containers. Proceed(y/n)?" yn
|
||||
case $yn in
|
||||
|
@ -39,16 +39,14 @@ function update_container() {
|
|||
}
|
||||
read -p "Skip stopped containers? " -n 1 -r
|
||||
echo
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]]
|
||||
then
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||
skip=no
|
||||
else
|
||||
skip=yes
|
||||
fi
|
||||
|
||||
for container in $containers
|
||||
do
|
||||
status=`pct status $container`
|
||||
for container in $containers; do
|
||||
status=$(pct status $container)
|
||||
if [ "$skip" == "no" ]; then
|
||||
if [ "$status" == "status: stopped" ]; then
|
||||
echo -e "${BL}[Info]${GN} Starting${BL} $container ${CL} \n"
|
||||
|
@ -67,6 +65,7 @@ do
|
|||
update_container $container
|
||||
fi
|
||||
fi
|
||||
done; wait
|
||||
done
|
||||
wait
|
||||
|
||||
echo -e "${GN} Finished, All Containers Updated. ${CL} \n"
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#!/usr/bin/env bash -ex
|
||||
LATEST=$(curl -sL https://api.github.com/repos/louislam/uptime-kuma/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
|
||||
YW=`echo "\033[33m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BGN=`echo "\033[4;92m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
DGN=`echo "\033[32m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD="-"
|
||||
CM="${GN}✓${CL}"
|
||||
|
@ -45,7 +45,10 @@ function msg_ok() {
|
|||
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}"
|
||||
sudo systemctl stop uptime-kuma &>/dev/null
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
VAULT=$(curl -s https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest \
|
||||
| grep "tag_name" \
|
||||
| awk '{print substr($2, 2, length($2)-3) }')
|
||||
VAULT=$(curl -s https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest |
|
||||
grep "tag_name" |
|
||||
awk '{print substr($2, 2, length($2)-3) }')
|
||||
|
||||
RD=`echo "\033[01;31m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=$(echo "\033[01;31m")
|
||||
BL=$(echo "\033[36m")
|
||||
CM='\xE2\x9C\x94\033'
|
||||
GN=`echo "\033[1;92m"`
|
||||
CL=`echo "\033[m"`
|
||||
GN=$(echo "\033[1;92m")
|
||||
CL=$(echo "\033[m")
|
||||
function update_info {
|
||||
echo -e "${BL}
|
||||
__ __ _ _ _
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
VWRELEASE=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/releases/latest \
|
||||
| grep "tag_name" \
|
||||
| awk '{print substr($2, 2, length($2)-3) }')
|
||||
VWRELEASE=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/releases/latest |
|
||||
grep "tag_name" |
|
||||
awk '{print substr($2, 2, length($2)-3) }')
|
||||
|
||||
RD=`echo "\033[01;31m"`
|
||||
BL=`echo "\033[36m"`
|
||||
RD=$(echo "\033[01;31m")
|
||||
BL=$(echo "\033[36m")
|
||||
CM='\xE2\x9C\x94\033'
|
||||
GN=`echo "\033[1;92m"`
|
||||
CL=`echo "\033[m"`
|
||||
GN=$(echo "\033[1;92m")
|
||||
CL=$(echo "\033[m")
|
||||
function update_info {
|
||||
echo -e "${BL}
|
||||
__ __ _ _ _
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
YW=`echo "\033[33m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BL=`echo "\033[36m"`
|
||||
YW=$(echo "\033[33m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BL=$(echo "\033[36m")
|
||||
CM='\xE2\x9C\x94\033'
|
||||
GN=`echo "\033[1;92m"`
|
||||
CL=`echo "\033[m"`
|
||||
GN=$(echo "\033[1;92m")
|
||||
CL=$(echo "\033[m")
|
||||
while true; do
|
||||
read -p "This will Install Webmin, Proceed(y/n)?" yn
|
||||
case $yn in
|
||||
|
@ -36,5 +36,4 @@ echo -e "${CM}${CL} \r"
|
|||
IP=$(hostname -I | cut -f1 -d ' ')
|
||||
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)"
|
||||
|
|
|
@ -73,9 +73,9 @@ while [ -z "${CTID_TO:+x}" ]; do
|
|||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||
done
|
||||
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_MENU[$i]}" == "$CTID_TO" ] && \
|
||||
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
||||
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
||||
done
|
||||
whiptail --defaultno --title "$TITLE" --yesno \
|
||||
|
@ -89,13 +89,13 @@ if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then
|
|||
fi
|
||||
msg "Mounting Container Disks..."
|
||||
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}'."
|
||||
[ -d "${CTID_FROM_PATH}${DATA_PATH}" ] || \
|
||||
[ -d "${CTID_FROM_PATH}${DATA_PATH}" ] ||
|
||||
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}'."
|
||||
[ -d "${CTID_TO_PATH}${DATA_PATH}" ] || \
|
||||
[ -d "${CTID_TO_PATH}${DATA_PATH}" ] ||
|
||||
die "Zigbee2MQTT directories in '$CTID_TO' not found."
|
||||
|
||||
#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
|
||||
done
|
||||
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_MENU[$i]}" == "$CTID_TO" ] && \
|
||||
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
||||
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
||||
done
|
||||
whiptail --defaultno --title "$TITLE" --yesno \
|
||||
|
@ -91,13 +91,13 @@ fi
|
|||
msg "Mounting Container Disks..."
|
||||
DATA_PATH=/opt/zwavejs2mqtt/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}'."
|
||||
[ -d "${CTID_FROM_PATH}${DATA_PATH}" ] || \
|
||||
[ -d "${CTID_FROM_PATH}${DATA_PATH}" ] ||
|
||||
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}'."
|
||||
[ -d "${CTID_TO_PATH}${DATA_PATH_NEW}" ] || \
|
||||
[ -d "${CTID_TO_PATH}${DATA_PATH_NEW}" ] ||
|
||||
die "Zwavejs2MQTT directories in '$CTID_TO' not found."
|
||||
|
||||
#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"
|
||||
|
||||
info "Successfully Transferred Data."
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#!/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) }')
|
||||
set -e
|
||||
YW=`echo "\033[33m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BL=`echo "\033[36m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BL=$(echo "\033[36m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
CL=$(echo "\033[m")
|
||||
CM="${GN}✓${CL}"
|
||||
CROSS="${RD}✗${CL}"
|
||||
BFR="\\r\\033[K"
|
||||
|
@ -43,7 +43,10 @@ while true; do
|
|||
*) echo "Please answer yes or no." ;;
|
||||
esac
|
||||
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"
|
||||
systemctl stop zwave-js-ui.service
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
YW=`echo "\033[33m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BL=`echo "\033[36m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BL=$(echo "\033[36m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
CL=$(echo "\033[m")
|
||||
RETRY_NUM=10
|
||||
RETRY_EVERY=3
|
||||
NUM=$RETRY_NUM
|
||||
|
@ -47,12 +47,11 @@ msg_info "Setting up Container OS "
|
|||
sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
|
||||
locale-gen >/dev/null
|
||||
while [ "$(hostname -I)" = "" ]; do
|
||||
1>&2 echo -en "${CROSS}${RD} No Network! "
|
||||
echo 1>&2 -en "${CROSS}${RD} No Network! "
|
||||
sleep $RETRY_EVERY
|
||||
((NUM--))
|
||||
if [ $NUM -eq 0 ]
|
||||
then
|
||||
1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
|
||||
if [ $NUM -eq 0 ]; then
|
||||
echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)"
|
|||
|
||||
set +e
|
||||
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)
|
||||
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'
|
||||
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
|
||||
msg_ok "Installed AdGuard Home"
|
||||
|
||||
PASS=$(grep -w "root" /etc/shadow | cut -b6);
|
||||
PASS=$(grep -w "root" /etc/shadow | cut -b6)
|
||||
if [[ $PASS != $ ]]; then
|
||||
msg_info "Customizing Container"
|
||||
rm /etc/motd
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
YW=`echo "\033[33m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BL=`echo "\033[36m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BL=$(echo "\033[36m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
CL=$(echo "\033[m")
|
||||
RETRY_NUM=10
|
||||
RETRY_EVERY=3
|
||||
NUM=$RETRY_NUM
|
||||
|
@ -46,12 +46,11 @@ msg_info "Setting up Container OS "
|
|||
sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
|
||||
locale-gen >/dev/null
|
||||
while [ "$(hostname -I)" = "" ]; do
|
||||
1>&2 echo -en "${CROSS}${RD} No Network! "
|
||||
echo 1>&2 -en "${CROSS}${RD} No Network! "
|
||||
sleep $RETRY_EVERY
|
||||
((NUM--))
|
||||
if [ $NUM -eq 0 ]
|
||||
then
|
||||
1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
|
||||
if [ $NUM -eq 0 ]; then
|
||||
echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
@ -60,9 +59,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)"
|
|||
|
||||
set +e
|
||||
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)
|
||||
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'
|
||||
set -e
|
||||
|
||||
|
@ -338,7 +340,7 @@ EOF
|
|||
systemctl enable --now blocky
|
||||
msg_ok "Created Service"
|
||||
|
||||
PASS=$(grep -w "root" /etc/shadow | cut -b6);
|
||||
PASS=$(grep -w "root" /etc/shadow | cut -b6)
|
||||
if [[ $PASS != $ ]]; then
|
||||
msg_info "Customizing Container"
|
||||
chmod -x /etc/update-motd.d/*
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
YW=`echo "\033[33m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BL=`echo "\033[36m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BL=$(echo "\033[36m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
CL=$(echo "\033[m")
|
||||
RETRY_NUM=10
|
||||
RETRY_EVERY=3
|
||||
NUM=$RETRY_NUM
|
||||
|
@ -47,12 +47,11 @@ msg_info "Setting up Container OS "
|
|||
sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
|
||||
locale-gen >/dev/null
|
||||
while [ "$(hostname -I)" = "" ]; do
|
||||
1>&2 echo -en "${CROSS}${RD} No Network! "
|
||||
echo 1>&2 -en "${CROSS}${RD} No Network! "
|
||||
sleep $RETRY_EVERY
|
||||
((NUM--))
|
||||
if [ $NUM -eq 0 ]
|
||||
then
|
||||
1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
|
||||
if [ $NUM -eq 0 ]; then
|
||||
echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)"
|
|||
|
||||
set +e
|
||||
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)
|
||||
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'
|
||||
set -e
|
||||
|
||||
|
@ -90,7 +92,7 @@ msg_info "Installing CasaOS (Patience)"
|
|||
wget -qO- https://get.casaos.io | bash &>/dev/null
|
||||
msg_ok "Installed CasaOS"
|
||||
|
||||
PASS=$(grep -w "root" /etc/shadow | cut -b6);
|
||||
PASS=$(grep -w "root" /etc/shadow | cut -b6)
|
||||
if [[ $PASS != $ ]]; then
|
||||
msg_info "Customizing Container"
|
||||
rm /etc/motd
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
YW=`echo "\033[33m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BL=`echo "\033[36m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BL=$(echo "\033[36m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
CL=$(echo "\033[m")
|
||||
RETRY_NUM=10
|
||||
RETRY_EVERY=3
|
||||
NUM=$RETRY_NUM
|
||||
|
@ -47,12 +47,11 @@ msg_info "Setting up Container OS "
|
|||
sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
|
||||
locale-gen >/dev/null
|
||||
while [ "$(hostname -I)" = "" ]; do
|
||||
1>&2 echo -en "${CROSS}${RD} No Network! "
|
||||
echo 1>&2 -en "${CROSS}${RD} No Network! "
|
||||
sleep $RETRY_EVERY
|
||||
((NUM--))
|
||||
if [ $NUM -eq 0 ]
|
||||
then
|
||||
1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
|
||||
if [ $NUM -eq 0 ]; then
|
||||
echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)"
|
|||
|
||||
set +e
|
||||
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)
|
||||
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'
|
||||
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
|
||||
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
|
||||
msg_info "Customizing Container"
|
||||
rm /etc/motd
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
YW=`echo "\033[33m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BL=`echo "\033[36m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BL=$(echo "\033[36m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
CL=$(echo "\033[m")
|
||||
RETRY_NUM=10
|
||||
RETRY_EVERY=3
|
||||
NUM=$RETRY_NUM
|
||||
|
@ -47,12 +47,11 @@ msg_info "Setting up Container OS "
|
|||
sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
|
||||
locale-gen >/dev/null
|
||||
while [ "$(hostname -I)" = "" ]; do
|
||||
1>&2 echo -en "${CROSS}${RD} No Network! "
|
||||
echo 1>&2 -en "${CROSS}${RD} No Network! "
|
||||
sleep $RETRY_EVERY
|
||||
((NUM--))
|
||||
if [ $NUM -eq 0 ]
|
||||
then
|
||||
1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
|
||||
if [ $NUM -eq 0 ]; then
|
||||
echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)"
|
|||
|
||||
set +e
|
||||
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)
|
||||
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'
|
||||
set -e
|
||||
|
||||
|
@ -114,7 +116,7 @@ sudo systemctl start dashy &>/dev/null
|
|||
sudo systemctl enable dashy &>/dev/null
|
||||
msg_ok "Created Service"
|
||||
|
||||
PASS=$(grep -w "root" /etc/shadow | cut -b6);
|
||||
PASS=$(grep -w "root" /etc/shadow | cut -b6)
|
||||
if [[ $PASS != $ ]]; then
|
||||
msg_info "Customizing Container"
|
||||
rm /etc/motd
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
YW=`echo "\033[33m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BL=`echo "\033[36m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BL=$(echo "\033[36m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
CL=$(echo "\033[m")
|
||||
RETRY_NUM=10
|
||||
RETRY_EVERY=3
|
||||
NUM=$RETRY_NUM
|
||||
|
@ -46,12 +46,11 @@ msg_info "Setting up Container OS "
|
|||
sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
|
||||
locale-gen >/dev/null
|
||||
while [ "$(hostname -I)" = "" ]; do
|
||||
1>&2 echo -en "${CROSS}${RD} No Network! "
|
||||
echo 1>&2 -en "${CROSS}${RD} No Network! "
|
||||
sleep $RETRY_EVERY
|
||||
((NUM--))
|
||||
if [ $NUM -eq 0 ]
|
||||
then
|
||||
1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
|
||||
if [ $NUM -eq 0 ]; then
|
||||
echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
@ -60,9 +59,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)"
|
|||
|
||||
set +e
|
||||
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)
|
||||
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'
|
||||
set -e
|
||||
|
||||
|
@ -76,7 +78,7 @@ apt-get install -y curl &>/dev/null
|
|||
apt-get install -y sudo &>/dev/null
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PASS=$(grep -w "root" /etc/shadow | cut -b6);
|
||||
PASS=$(grep -w "root" /etc/shadow | cut -b6)
|
||||
if [[ $PASS != $ ]]; then
|
||||
msg_info "Customizing Container"
|
||||
chmod -x /etc/update-motd.d/*
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
YW=`echo "\033[33m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BL=`echo "\033[36m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BL=$(echo "\033[36m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
CL=$(echo "\033[m")
|
||||
RETRY_NUM=10
|
||||
RETRY_EVERY=3
|
||||
NUM=$RETRY_NUM
|
||||
|
@ -47,12 +47,11 @@ msg_info "Setting up Container OS "
|
|||
sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
|
||||
locale-gen >/dev/null
|
||||
while [ "$(hostname -I)" = "" ]; do
|
||||
1>&2 echo -en "${CROSS}${RD} No Network! "
|
||||
echo 1>&2 -en "${CROSS}${RD} No Network! "
|
||||
sleep $RETRY_EVERY
|
||||
((NUM--))
|
||||
if [ $NUM -eq 0 ]
|
||||
then
|
||||
1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
|
||||
if [ $NUM -eq 0 ]; then
|
||||
echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)"
|
|||
|
||||
set +e
|
||||
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)
|
||||
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'
|
||||
set -e
|
||||
|
||||
|
@ -108,7 +110,7 @@ systemctl start deconz
|
|||
systemctl enable deconz &>/dev/null
|
||||
msg_ok "Created Service"
|
||||
|
||||
PASS=$(grep -w "root" /etc/shadow | cut -b6);
|
||||
PASS=$(grep -w "root" /etc/shadow | cut -b6)
|
||||
if [[ $PASS != $ ]]; then
|
||||
msg_info "Customizing Container"
|
||||
chmod -x /etc/update-motd.d/*
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
YW=`echo "\033[33m"`
|
||||
RD=`echo "\033[01;31m"`
|
||||
BL=`echo "\033[36m"`
|
||||
GN=`echo "\033[1;92m"`
|
||||
CL=`echo "\033[m"`
|
||||
YW=$(echo "\033[33m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BL=$(echo "\033[36m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
CL=$(echo "\033[m")
|
||||
RETRY_NUM=10
|
||||
RETRY_EVERY=3
|
||||
NUM=$RETRY_NUM
|
||||
|
@ -47,12 +47,11 @@ msg_info "Setting up Container OS "
|
|||
sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
|
||||
locale-gen >/dev/null
|
||||
while [ "$(hostname -I)" = "" ]; do
|
||||
1>&2 echo -en "${CROSS}${RD} No Network! "
|
||||
echo 1>&2 -en "${CROSS}${RD} No Network! "
|
||||
sleep $RETRY_EVERY
|
||||
((NUM--))
|
||||
if [ $NUM -eq 0 ]
|
||||
then
|
||||
1>&2 echo -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
|
||||
if [ $NUM -eq 0 ]; then
|
||||
echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
@ -61,9 +60,12 @@ msg_ok "Network Connected: ${BL}$(hostname -I)"
|
|||
|
||||
set +e
|
||||
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)
|
||||
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'
|
||||
set -e
|
||||
|
||||
|
@ -97,8 +99,7 @@ sh <(curl -sSL https://get.docker.com) &>/dev/null
|
|||
msg_ok "Installed Docker $DOCKER_LATEST_VERSION"
|
||||
|
||||
read -r -p "Would you like to add Portainer? <y/N> " prompt
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
|
||||
then
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
|
||||
PORTAINER="Y"
|
||||
else
|
||||
PORTAINER="N"
|
||||
|
@ -119,8 +120,7 @@ msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION"
|
|||
fi
|
||||
|
||||
read -r -p "Would you like to add Docker Compose? <y/N> " prompt
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
|
||||
then
|
||||
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
|
||||
DOCKER_COMPOSE="Y"
|
||||
else
|
||||
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"
|
||||
fi
|
||||
|
||||
PASS=$(grep -w "root" /etc/shadow | cut -b6);
|
||||
PASS=$(grep -w "root" /etc/shadow | cut -b6)
|
||||
if [[ $PASS != $ ]]; then
|
||||
msg_info "Customizing Container"
|
||||
rm /etc/motd
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue