mirror of
https://github.com/tteck/Proxmox.git
synced 2024-12-25 00:18:59 +01:00
Update mqtt-v4.sh
fix missing variables
This commit is contained in:
parent
1de5901ff4
commit
9e1c5b15e0
@ -69,33 +69,37 @@ if [[ $PVE != 1 ]]; then
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
function default_settings() {
|
function default_settings() {
|
||||||
echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
|
echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
|
||||||
CT_TYPE="1"
|
CT_TYPE="1"
|
||||||
echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}"
|
echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}"
|
||||||
PW=""
|
PW=""
|
||||||
echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}"
|
echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}"
|
||||||
CT_ID=$NEXTID
|
CT_ID=$NEXTID
|
||||||
echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}"
|
echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}"
|
||||||
HN=$NSAPP
|
HN=$NSAPP
|
||||||
echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}"
|
echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}"
|
||||||
DISK_SIZE="$var_disk"
|
DISK_SIZE="$var_disk"
|
||||||
echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}"
|
echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}"
|
||||||
CORE_COUNT="$var_cpu"
|
CORE_COUNT="$var_cpu"
|
||||||
echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}"
|
echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}"
|
||||||
RAM_SIZE="$var_ram"
|
RAM_SIZE="$var_ram"
|
||||||
echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}"
|
echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}"
|
||||||
BRG="vmbr0"
|
BRG="vmbr0"
|
||||||
echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}"
|
echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}"
|
||||||
NET=dhcp
|
NET=dhcp
|
||||||
echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}"
|
echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}"
|
||||||
GATE=""
|
GATE=""
|
||||||
echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}"
|
echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}"
|
||||||
MAC=""
|
SD=""
|
||||||
echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}"
|
echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}"
|
||||||
VLAN=""
|
NS=""
|
||||||
echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}"
|
echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}"
|
||||||
SSH="no"
|
MAC=""
|
||||||
echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}"
|
echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}"
|
||||||
|
VLAN=""
|
||||||
|
echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}"
|
||||||
|
SSH="no"
|
||||||
|
echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}"
|
||||||
}
|
}
|
||||||
function advanced_settings() {
|
function advanced_settings() {
|
||||||
CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \
|
CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \
|
||||||
@ -169,6 +173,30 @@ else
|
|||||||
echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
|
echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
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)
|
||||||
|
exitstatus=$?
|
||||||
|
if [ $exitstatus = 0 ]; then
|
||||||
|
if [ -z $SD ]; then
|
||||||
|
SD=""
|
||||||
|
echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}"
|
||||||
|
else
|
||||||
|
SX=$SD
|
||||||
|
SD="-searchdomain=$SD"
|
||||||
|
echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
NS=$(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)
|
||||||
|
exitstatus=$?
|
||||||
|
if [ $exitstatus = 0 ]; then
|
||||||
|
if [ -z $NS ]; then
|
||||||
|
NS=""
|
||||||
|
echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}"
|
||||||
|
else
|
||||||
|
NX=$NS
|
||||||
|
NS="-nameserver=$NS"
|
||||||
|
echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||||
exitstatus=$?
|
exitstatus=$?
|
||||||
if [ $exitstatus = 0 ]; then
|
if [ $exitstatus = 0 ]; then
|
||||||
@ -189,6 +217,13 @@ else
|
|||||||
echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
|
echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then
|
||||||
|
echo -e "${DGN}Enable Root SSH Access: ${BGN}Yes${CL}"
|
||||||
|
SSH="yes"
|
||||||
|
else
|
||||||
|
echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}"
|
||||||
|
SSH="no"
|
||||||
|
fi
|
||||||
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?" --no-button Do-Over 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
|
||||||
|
Loading…
Reference in New Issue
Block a user