Update adguard-v5.sh

This commit is contained in:
tteckster 2023-03-09 12:46:56 -05:00 committed by GitHub
parent fff33e205c
commit 374bf599b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 15 deletions

View File

@ -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
@ -149,7 +149,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); then 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}"
@ -160,7 +160,7 @@ else
exit 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); then 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
@ -171,7 +171,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); then 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}"
@ -186,7 +186,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); then 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}"
@ -197,7 +197,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); then 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}"
@ -208,7 +208,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); then 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}"
@ -219,7 +219,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); then 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}"
@ -229,7 +229,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); then 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=""
@ -248,7 +248,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); then 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=""
@ -260,7 +260,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); then 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=""
@ -273,7 +273,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); then 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=""
@ -285,7 +285,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); then 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=""
@ -297,7 +297,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); then 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=""
@ -323,7 +323,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