mirror of https://github.com/tteck/Proxmox.git
Update debian-v5.sh
This commit is contained in:
parent
5a598692cd
commit
c83a4f461a
|
@ -130,7 +130,7 @@ function exit-script() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function advanced_settings() {
|
function advanced_settings() {
|
||||||
if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \
|
if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \
|
||||||
"1" "Unprivileged" ON \
|
"1" "Unprivileged" ON \
|
||||||
"0" "Privileged" OFF \
|
"0" "Privileged" OFF \
|
||||||
3>&1 1>&2 2>&3); then
|
3>&1 1>&2 2>&3); then
|
||||||
|
@ -151,7 +151,7 @@ else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z "$CT_ID" ]; then
|
if [ -z "$CT_ID" ]; then
|
||||||
CT_ID="$NEXTID"
|
CT_ID="$NEXTID"
|
||||||
echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"
|
echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"
|
||||||
|
@ -159,10 +159,10 @@ if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINE
|
||||||
echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
|
echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit-script
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z "$CT_NAME" ]; then
|
if [ -z "$CT_NAME" ]; then
|
||||||
HN="$NSAPP"
|
HN="$NSAPP"
|
||||||
else
|
else
|
||||||
|
@ -173,7 +173,7 @@ else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if 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)
|
if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z "$DISK_SIZE" ]; then
|
if [ -z "$DISK_SIZE" ]; then
|
||||||
DISK_SIZE="$var_disk"
|
DISK_SIZE="$var_disk"
|
||||||
echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
|
echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
|
||||||
|
@ -188,7 +188,7 @@ else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z "$CORE_COUNT" ]; then
|
if [ -z "$CORE_COUNT" ]; then
|
||||||
CORE_COUNT="$var_cpu"
|
CORE_COUNT="$var_cpu"
|
||||||
echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
|
echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
|
@ -199,7 +199,7 @@ else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z "$RAM_SIZE" ]; then
|
if [ -z "$RAM_SIZE" ]; then
|
||||||
RAM_SIZE="$var_ram"
|
RAM_SIZE="$var_ram"
|
||||||
echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
|
echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
|
||||||
|
@ -210,7 +210,7 @@ else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z "$BRG" ]; then
|
if [ -z "$BRG" ]; then
|
||||||
BRG="vmbr0"
|
BRG="vmbr0"
|
||||||
echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
|
echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
|
||||||
|
@ -221,7 +221,7 @@ else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if 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)
|
if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $NET ]; then
|
if [ -z $NET ]; then
|
||||||
NET="dhcp"
|
NET="dhcp"
|
||||||
echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
|
echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
|
||||||
|
@ -231,7 +231,7 @@ if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --t
|
||||||
else
|
else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
if 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)
|
if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $GATE1 ]; then
|
if [ -z $GATE1 ]; then
|
||||||
GATE1="Default"
|
GATE1="Default"
|
||||||
GATE=""
|
GATE=""
|
||||||
|
@ -250,7 +250,7 @@ else
|
||||||
fi
|
fi
|
||||||
echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}"
|
echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}"
|
||||||
|
|
||||||
if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $MTU1 ]; then
|
if [ -z $MTU1 ]; then
|
||||||
MTU1="Default"
|
MTU1="Default"
|
||||||
MTU=""
|
MTU=""
|
||||||
|
@ -262,7 +262,7 @@ else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $SD ]; then
|
if [ -z $SD ]; then
|
||||||
SX=Host
|
SX=Host
|
||||||
SD=""
|
SD=""
|
||||||
|
@ -275,7 +275,7 @@ else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $NX ]; then
|
if [ -z $NX ]; then
|
||||||
NX=Host
|
NX=Host
|
||||||
NS=""
|
NS=""
|
||||||
|
@ -287,7 +287,7 @@ else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if 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)
|
if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $MAC1 ]; then
|
if [ -z $MAC1 ]; then
|
||||||
MAC1="Default"
|
MAC1="Default"
|
||||||
MAC=""
|
MAC=""
|
||||||
|
@ -299,7 +299,7 @@ else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $VLAN1 ]; then
|
if [ -z $VLAN1 ]; then
|
||||||
VLAN1="Default"
|
VLAN1="Default"
|
||||||
VLAN=""
|
VLAN=""
|
||||||
|
@ -325,7 +325,7 @@ else
|
||||||
fi
|
fi
|
||||||
echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}"
|
echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}"
|
||||||
|
|
||||||
if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" --no-button Do-Over 10 58); then
|
if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then
|
||||||
echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}"
|
echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}"
|
||||||
else
|
else
|
||||||
clear
|
clear
|
||||||
|
|
Loading…
Reference in New Issue