mirror of https://github.com/tteck/Proxmox.git
add backtitle
This commit is contained in:
parent
e52b7872d2
commit
6fae1fc557
|
@ -57,7 +57,7 @@ function update_script() {
|
||||||
fi
|
fi
|
||||||
while true; do
|
while true; do
|
||||||
CHOICE=$(
|
CHOICE=$(
|
||||||
whiptail --title "SUPPORT" --menu "Select option" 11 58 1 \
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --menu "Select option" 11 58 1 \
|
||||||
"1" "Check for Docker Updates" 3>&2 2>&1 1>&3
|
"1" "Check for Docker Updates" 3>&2 2>&1 1>&3
|
||||||
)
|
)
|
||||||
exit_status=$?
|
exit_status=$?
|
||||||
|
|
|
@ -58,7 +58,7 @@ function update_script() {
|
||||||
LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
|
LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
|
||||||
while true; do
|
while true; do
|
||||||
CHOICE=$(
|
CHOICE=$(
|
||||||
whiptail --title "SUPPORT" --menu "Select option" 11 58 3 \
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --menu "Select option" 11 58 3 \
|
||||||
"1" "Check for Grafana Updates" \
|
"1" "Check for Grafana Updates" \
|
||||||
"2" "Allow 0.0.0.0 for listening" \
|
"2" "Allow 0.0.0.0 for listening" \
|
||||||
"3" "Allow only ${LXCIP} for listening" 3>&2 2>&1 1>&3
|
"3" "Allow only ${LXCIP} for listening" 3>&2 2>&1 1>&3
|
||||||
|
|
|
@ -57,7 +57,7 @@ function update_script() {
|
||||||
fi
|
fi
|
||||||
while true; do
|
while true; do
|
||||||
CHOICE=$(
|
CHOICE=$(
|
||||||
whiptail --title "SUPPORT" --menu "Select option" 11 58 2 \
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --menu "Select option" 11 58 2 \
|
||||||
"1" "Update Vaultwarden" \
|
"1" "Update Vaultwarden" \
|
||||||
"2" "Reset ADMIN_TOKEN" 3>&2 2>&1 1>&3
|
"2" "Reset ADMIN_TOKEN" 3>&2 2>&1 1>&3
|
||||||
)
|
)
|
||||||
|
@ -73,7 +73,7 @@ function update_script() {
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
2)
|
2)
|
||||||
if NEWTOKEN=$(whiptail --passwordbox "Setup your ADMIN_TOKEN (make it strong)" 10 58 3>&1 1>&2 2>&3); then
|
if NEWTOKEN=$(whiptail --backtitle "Proxmox VE Helper Scripts" --passwordbox "Setup your ADMIN_TOKEN (make it strong)" 10 58 3>&1 1>&2 2>&3); then
|
||||||
if [[ -z "$NEWTOKEN" ]]; then exit-script; fi
|
if [[ -z "$NEWTOKEN" ]]; then exit-script; fi
|
||||||
if ! command -v argon2 >/dev/null 2>&1; then apk add argon2 &>/dev/null; fi
|
if ! command -v argon2 >/dev/null 2>&1; then apk add argon2 &>/dev/null; fi
|
||||||
TOKEN=$(echo -n ${NEWTOKEN} | argon2 "$(openssl rand -base64 32)" -e -id -k 19456 -t 2 -p 1)
|
TOKEN=$(echo -n ${NEWTOKEN} | argon2 "$(openssl rand -base64 32)" -e -id -k 19456 -t 2 -p 1)
|
||||||
|
|
|
@ -57,7 +57,7 @@ function update_script() {
|
||||||
fi
|
fi
|
||||||
while true; do
|
while true; do
|
||||||
CHOICE=$(
|
CHOICE=$(
|
||||||
whiptail --title "SUPPORT" --menu "Select option" 11 58 1 \
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --menu "Select option" 11 58 1 \
|
||||||
"1" "Check for Zigbee2MQTT Updates" 3>&2 2>&1 1>&3
|
"1" "Check for Zigbee2MQTT Updates" 3>&2 2>&1 1>&3
|
||||||
)
|
)
|
||||||
exit_status=$?
|
exit_status=$?
|
||||||
|
|
|
@ -52,7 +52,7 @@ function default_settings() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_script() {
|
function update_script() {
|
||||||
UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 1 \
|
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 1 \
|
||||||
"1" "Check for Alpine Updates" ON \
|
"1" "Check for Alpine Updates" ON \
|
||||||
3>&1 1>&2 2>&3)
|
3>&1 1>&2 2>&3)
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ function exit-script() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function advanced_settings() {
|
function advanced_settings() {
|
||||||
if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \
|
if CT_TYPE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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
|
||||||
|
@ -138,7 +138,7 @@ else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then
|
if PW1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $PW1 ]; then
|
if [ -z $PW1 ]; then
|
||||||
PW1="Automatic Login"
|
PW1="Automatic Login"
|
||||||
PW=" "
|
PW=" "
|
||||||
|
@ -150,7 +150,7 @@ else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then
|
if CT_ID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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}"
|
||||||
|
@ -161,7 +161,7 @@ else
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then
|
if CT_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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
|
||||||
|
@ -172,7 +172,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" 3>&1 1>&2 2>&3); then
|
if DISK_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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}"
|
||||||
|
@ -187,7 +187,7 @@ else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then
|
if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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}"
|
||||||
|
@ -198,7 +198,7 @@ else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then
|
if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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}"
|
||||||
|
@ -209,7 +209,7 @@ else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then
|
if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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}"
|
||||||
|
@ -220,7 +220,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" 3>&1 1>&2 2>&3); then
|
if NET=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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}"
|
||||||
|
@ -230,7 +230,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" 3>&1 1>&2 2>&3); then
|
if GATE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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=""
|
||||||
|
@ -242,14 +242,14 @@ else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then
|
||||||
DISABLEIP6="yes"
|
DISABLEIP6="yes"
|
||||||
else
|
else
|
||||||
DISABLEIP6="no"
|
DISABLEIP6="no"
|
||||||
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" 3>&1 1>&2 2>&3); then
|
if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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=""
|
||||||
|
@ -261,7 +261,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" 3>&1 1>&2 2>&3); then
|
if SD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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=""
|
||||||
|
@ -274,7 +274,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" 3>&1 1>&2 2>&3); then
|
if NX=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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=""
|
||||||
|
@ -286,7 +286,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" 3>&1 1>&2 2>&3); then
|
if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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=""
|
||||||
|
@ -298,7 +298,7 @@ else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then
|
if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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=""
|
||||||
|
@ -310,21 +310,21 @@ else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then
|
||||||
SSH="yes"
|
SSH="yes"
|
||||||
else
|
else
|
||||||
SSH="no"
|
SSH="no"
|
||||||
fi
|
fi
|
||||||
echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}"
|
echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}"
|
||||||
|
|
||||||
if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then
|
||||||
VERB="yes"
|
VERB="yes"
|
||||||
else
|
else
|
||||||
VERB="no"
|
VERB="no"
|
||||||
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?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --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
|
||||||
|
@ -339,7 +339,7 @@ ARCH_CHECK
|
||||||
PVE_CHECK
|
PVE_CHECK
|
||||||
NEXTID=$(pvesh get /cluster/nextid)
|
NEXTID=$(pvesh get /cluster/nextid)
|
||||||
header_info
|
header_info
|
||||||
if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
|
||||||
header_info
|
header_info
|
||||||
echo -e "${BL}Using Default Settings${CL}"
|
echo -e "${BL}Using Default Settings${CL}"
|
||||||
default_settings
|
default_settings
|
||||||
|
@ -361,7 +361,7 @@ exit
|
||||||
}
|
}
|
||||||
|
|
||||||
if command -v pveversion >/dev/null 2>&1; then
|
if command -v pveversion >/dev/null 2>&1; then
|
||||||
if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then
|
if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then
|
||||||
clear
|
clear
|
||||||
echo -e "⚠ User exited script \n"
|
echo -e "⚠ User exited script \n"
|
||||||
exit
|
exit
|
||||||
|
@ -370,7 +370,7 @@ if command -v pveversion >/dev/null 2>&1; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! command -v pveversion >/dev/null 2>&1; then
|
if ! command -v pveversion >/dev/null 2>&1; then
|
||||||
if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then
|
if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then
|
||||||
clear
|
clear
|
||||||
echo -e "⚠ User exited script \n"
|
echo -e "⚠ User exited script \n"
|
||||||
exit
|
exit
|
||||||
|
|
|
@ -100,7 +100,7 @@ function select_storage() {
|
||||||
else
|
else
|
||||||
local STORAGE
|
local STORAGE
|
||||||
while [ -z "${STORAGE:+x}" ]; do
|
while [ -z "${STORAGE:+x}" ]; do
|
||||||
STORAGE=$(whiptail --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\nTo make a selection, use the Spacebar.\n" \
|
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\nTo make a selection, use the Spacebar.\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${MENU[@]}" 3>&1 1>&2 2>&3) || exit "Menu aborted."
|
"${MENU[@]}" 3>&1 1>&2 2>&3) || exit "Menu aborted."
|
||||||
|
|
|
@ -51,7 +51,7 @@ function default_settings() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_script() {
|
function update_script() {
|
||||||
UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \
|
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \
|
||||||
"1" "Update ${APP}" ON \
|
"1" "Update ${APP}" ON \
|
||||||
"2" "Install ${APP} Worker" OFF \
|
"2" "Install ${APP} Worker" OFF \
|
||||||
3>&1 1>&2 2>&3)
|
3>&1 1>&2 2>&3)
|
||||||
|
|
|
@ -57,7 +57,7 @@ function update_script() {
|
||||||
fi
|
fi
|
||||||
PY=$(ls /srv/homeassistant/lib/)
|
PY=$(ls /srv/homeassistant/lib/)
|
||||||
IP=$(hostname -I | awk '{print $1}')
|
IP=$(hostname -I | awk '{print $1}')
|
||||||
UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \
|
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \
|
||||||
"1" "Update Core" ON \
|
"1" "Update Core" ON \
|
||||||
"2" "Install HACS" OFF \
|
"2" "Install HACS" OFF \
|
||||||
"3" "Install FileBrowser" OFF \
|
"3" "Install FileBrowser" OFF \
|
||||||
|
@ -65,7 +65,7 @@ function update_script() {
|
||||||
3>&1 1>&2 2>&3)
|
3>&1 1>&2 2>&3)
|
||||||
header_info
|
header_info
|
||||||
if [ "$UPD" == "1" ]; then
|
if [ "$UPD" == "1" ]; then
|
||||||
if (whiptail --defaultno --title "SELECT BRANCH" --yesno "Use Beta Branch?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SELECT BRANCH" --yesno "Use Beta Branch?" 10 58); then
|
||||||
clear
|
clear
|
||||||
header_info
|
header_info
|
||||||
echo -e "${GN}Updating to Beta Version${CL}"
|
echo -e "${GN}Updating to Beta Version${CL}"
|
||||||
|
|
|
@ -56,7 +56,7 @@ function update_script() {
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \
|
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \
|
||||||
"1" "Update ALL Containers" ON \
|
"1" "Update ALL Containers" ON \
|
||||||
"2" "Remove ALL Unused Images" OFF \
|
"2" "Remove ALL Unused Images" OFF \
|
||||||
"3" "Install HACS" OFF \
|
"3" "Install HACS" OFF \
|
||||||
|
|
|
@ -52,7 +52,7 @@ function default_settings() {
|
||||||
|
|
||||||
function update_script() {
|
function update_script() {
|
||||||
if [[ ! -d /root/.node-red ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
if [[ ! -d /root/.node-red ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||||
UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \
|
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \
|
||||||
"1" "Update ${APP}" ON \
|
"1" "Update ${APP}" ON \
|
||||||
"2" "Install Themes" OFF \
|
"2" "Install Themes" OFF \
|
||||||
3>&1 1>&2 2>&3)
|
3>&1 1>&2 2>&3)
|
||||||
|
@ -73,7 +73,7 @@ msg_ok "Update Successful"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
if [ "$UPD" == "2" ]; then
|
if [ "$UPD" == "2" ]; then
|
||||||
THEME=$(whiptail --title "NODE-RED THEMES" --radiolist --cancel-button Exit-Script "Choose Theme" 15 58 6 \
|
THEME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "NODE-RED THEMES" --radiolist --cancel-button Exit-Script "Choose Theme" 15 58 6 \
|
||||||
"dark" "" OFF \
|
"dark" "" OFF \
|
||||||
"dracula" "" OFF \
|
"dracula" "" OFF \
|
||||||
"midnight-red" "" ON \
|
"midnight-red" "" ON \
|
||||||
|
|
|
@ -59,7 +59,7 @@ function update_script() {
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/paperless-ngx/paperless-ngx/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
RELEASE=$(curl -s https://api.github.com/repos/paperless-ngx/paperless-ngx/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
SER=/etc/systemd/system/paperless-task-queue.service
|
SER=/etc/systemd/system/paperless-task-queue.service
|
||||||
|
|
||||||
UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \
|
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \
|
||||||
"1" "Update Paperless-ngx to $RELEASE" ON \
|
"1" "Update Paperless-ngx to $RELEASE" ON \
|
||||||
"2" "Paperless-ngx Credentials" OFF \
|
"2" "Paperless-ngx Credentials" OFF \
|
||||||
3>&1 1>&2 2>&3)
|
3>&1 1>&2 2>&3)
|
||||||
|
|
|
@ -52,7 +52,7 @@ function default_settings() {
|
||||||
|
|
||||||
function update_script() {
|
function update_script() {
|
||||||
if [[ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
if [[ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||||
UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select \nplexupdate info >> https://github.com/mrworf/plexupdate" 10 59 2 \
|
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select \nplexupdate info >> https://github.com/mrworf/plexupdate" 10 59 2 \
|
||||||
"1" "Update LXC" ON \
|
"1" "Update LXC" ON \
|
||||||
"2" "Install plexupdate" OFF \
|
"2" "Install plexupdate" OFF \
|
||||||
3>&1 1>&2 2>&3)
|
3>&1 1>&2 2>&3)
|
||||||
|
|
|
@ -56,7 +56,7 @@ function default_settings() {
|
||||||
|
|
||||||
function update_script() {
|
function update_script() {
|
||||||
if [[ ! -f /etc/systemd/system/homeassistant.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
if [[ ! -f /etc/systemd/system/homeassistant.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||||
UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \
|
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \
|
||||||
"1" "Update system and containers" ON \
|
"1" "Update system and containers" ON \
|
||||||
"2" "Install HACS" OFF \
|
"2" "Install HACS" OFF \
|
||||||
"3" "Install FileBrowser" OFF \
|
"3" "Install FileBrowser" OFF \
|
||||||
|
|
|
@ -62,7 +62,7 @@ function update_script() {
|
||||||
grep "tag_name" |
|
grep "tag_name" |
|
||||||
awk '{print substr($2, 2, length($2)-3) }')
|
awk '{print substr($2, 2, length($2)-3) }')
|
||||||
|
|
||||||
UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 3 \
|
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 3 \
|
||||||
"1" "VaultWarden $VAULT" ON \
|
"1" "VaultWarden $VAULT" ON \
|
||||||
"2" "Web-Vault $WVRELEASE" OFF \
|
"2" "Web-Vault $WVRELEASE" OFF \
|
||||||
"3" "Set Admin Token" OFF \
|
"3" "Set Admin Token" OFF \
|
||||||
|
@ -121,7 +121,7 @@ function update_script() {
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
if [ "$UPD" == "3" ]; then
|
if [ "$UPD" == "3" ]; then
|
||||||
if NEWTOKEN=$(whiptail --passwordbox "Set the ADMIN_TOKEN" 10 58 3>&1 1>&2 2>&3); then
|
if NEWTOKEN=$(whiptail --backtitle "Proxmox VE Helper Scripts" --passwordbox "Set the ADMIN_TOKEN" 10 58 3>&1 1>&2 2>&3); then
|
||||||
if [[ -z "$NEWTOKEN" ]]; then exit; fi
|
if [[ -z "$NEWTOKEN" ]]; then exit; fi
|
||||||
if ! command -v argon2 >/dev/null 2>&1; then apt-get install -y argon2 &>/dev/null; fi
|
if ! command -v argon2 >/dev/null 2>&1; then apt-get install -y argon2 &>/dev/null; fi
|
||||||
TOKEN=$(echo -n ${NEWTOKEN} | argon2 "$(openssl rand -base64 32)" -t 2 -m 16 -p 4 -l 64 -e)
|
TOKEN=$(echo -n ${NEWTOKEN} | argon2 "$(openssl rand -base64 32)" -t 2 -m 16 -p 4 -l 64 -e)
|
||||||
|
|
|
@ -52,7 +52,7 @@ function default_settings() {
|
||||||
|
|
||||||
function update_script() {
|
function update_script() {
|
||||||
if [[ ! -d /etc/pivpn/wireguard ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
if [[ ! -d /etc/pivpn/wireguard ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||||
UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \
|
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \
|
||||||
"1" "Update ${APP} LXC" ON \
|
"1" "Update ${APP} LXC" ON \
|
||||||
"2" "Install WGDashboard" OFF \
|
"2" "Install WGDashboard" OFF \
|
||||||
3>&1 1>&2 2>&3)
|
3>&1 1>&2 2>&3)
|
||||||
|
|
|
@ -59,7 +59,7 @@ while read -r line; do
|
||||||
done < <(pct list | awk 'NR>1')
|
done < <(pct list | awk 'NR>1')
|
||||||
|
|
||||||
while [ -z "${CTID:+x}" ]; do
|
while [ -z "${CTID:+x}" ]; do
|
||||||
CTID=$(whiptail --title "Containers on $NODE" --radiolist \
|
CTID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --radiolist \
|
||||||
"\nSelect a container to add Tailscale to:\n" \
|
"\nSelect a container to add Tailscale to:\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
|
|
|
@ -55,7 +55,7 @@ msg_error() {
|
||||||
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
|
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
|
||||||
pve_check() {
|
pve_check() {
|
||||||
if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then
|
if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then
|
||||||
whiptail --msgbox --title "Proxmox VE 7 Detected" "You are currently using Proxmox VE 7, refrain from creating Debian 12 LXCs due to differences in locale parameters. \n Default distribution for $APP LXC is ${var_os} ${var_version}" 10 58
|
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Proxmox VE 7 Detected" "You are currently using Proxmox VE 7, refrain from creating Debian 12 LXCs due to differences in locale parameters. \n Default distribution for $APP LXC is ${var_os} ${var_version}" 10 58
|
||||||
fi
|
fi
|
||||||
if ! pveversion | grep -Eq "pve-manager/(7\.[0-9]|8\.[0-9])"; then
|
if ! pveversion | grep -Eq "pve-manager/(7\.[0-9]|8\.[0-9])"; then
|
||||||
echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported"
|
echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported"
|
||||||
|
@ -80,7 +80,7 @@ arch_check() {
|
||||||
ssh_check() {
|
ssh_check() {
|
||||||
if command -v pveversion >/dev/null 2>&1; then
|
if command -v pveversion >/dev/null 2>&1; then
|
||||||
if [ -n "${SSH_CLIENT:+x}" ]; then
|
if [ -n "${SSH_CLIENT:+x}" ]; then
|
||||||
if whiptail --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then
|
if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then
|
||||||
echo "you've been warned"
|
echo "you've been warned"
|
||||||
else
|
else
|
||||||
clear
|
clear
|
||||||
|
@ -127,12 +127,12 @@ exit-script() {
|
||||||
|
|
||||||
# This function allows the user to configure advanced settings for the script.
|
# This function allows the user to configure advanced settings for the script.
|
||||||
advanced_settings() {
|
advanced_settings() {
|
||||||
whiptail --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58
|
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58
|
||||||
whiptail --msgbox --title "Default distribution for $APP" "${var_os} \n${var_version} \n" 8 58
|
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "${var_os} \n${var_version} \n" 8 58
|
||||||
if [ "$var_os" != "alpine" ]; then
|
if [ "$var_os" != "alpine" ]; then
|
||||||
var_os=""
|
var_os=""
|
||||||
while [ -z "$var_os" ]; do
|
while [ -z "$var_os" ]; do
|
||||||
if var_os=$(whiptail --title "DISTRIBUTION" --radiolist "Choose Distribution:" 10 58 2 \
|
if var_os=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution:" 10 58 2 \
|
||||||
"debian" "" OFF \
|
"debian" "" OFF \
|
||||||
"ubuntu" "" OFF \
|
"ubuntu" "" OFF \
|
||||||
3>&1 1>&2 2>&3); then
|
3>&1 1>&2 2>&3); then
|
||||||
|
@ -148,7 +148,7 @@ advanced_settings() {
|
||||||
if [ "$var_os" == "debian" ]; then
|
if [ "$var_os" == "debian" ]; then
|
||||||
var_version=""
|
var_version=""
|
||||||
while [ -z "$var_version" ]; do
|
while [ -z "$var_version" ]; do
|
||||||
if var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \
|
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \
|
||||||
"11" "Bullseye" OFF \
|
"11" "Bullseye" OFF \
|
||||||
"12" "Bookworm" OFF \
|
"12" "Bookworm" OFF \
|
||||||
3>&1 1>&2 2>&3); then
|
3>&1 1>&2 2>&3); then
|
||||||
|
@ -164,7 +164,7 @@ advanced_settings() {
|
||||||
if [ "$var_os" == "ubuntu" ]; then
|
if [ "$var_os" == "ubuntu" ]; then
|
||||||
var_version=""
|
var_version=""
|
||||||
while [ -z "$var_version" ]; do
|
while [ -z "$var_version" ]; do
|
||||||
if var_version=$(whiptail --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 3 \
|
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 3 \
|
||||||
"20.04" "Focal" OFF \
|
"20.04" "Focal" OFF \
|
||||||
"22.04" "Jammy" OFF \
|
"22.04" "Jammy" OFF \
|
||||||
"23.04" "Lunar" OFF \
|
"23.04" "Lunar" OFF \
|
||||||
|
@ -180,7 +180,7 @@ advanced_settings() {
|
||||||
|
|
||||||
CT_TYPE=""
|
CT_TYPE=""
|
||||||
while [ -z "$CT_TYPE" ]; do
|
while [ -z "$CT_TYPE" ]; do
|
||||||
if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \
|
if CT_TYPE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \
|
||||||
"1" "Unprivileged" OFF \
|
"1" "Unprivileged" OFF \
|
||||||
"0" "Privileged" OFF \
|
"0" "Privileged" OFF \
|
||||||
3>&1 1>&2 2>&3); then
|
3>&1 1>&2 2>&3); then
|
||||||
|
@ -192,7 +192,7 @@ advanced_settings() {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then
|
if PW1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $PW1 ]; then
|
if [ -z $PW1 ]; then
|
||||||
PW1="Automatic Login"
|
PW1="Automatic Login"
|
||||||
PW=""
|
PW=""
|
||||||
|
@ -204,7 +204,7 @@ advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then
|
if CT_ID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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}"
|
||||||
|
@ -215,7 +215,7 @@ advanced_settings() {
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then
|
if CT_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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
|
||||||
|
@ -226,7 +226,7 @@ advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
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 DISK_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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}"
|
||||||
|
@ -241,7 +241,7 @@ advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then
|
if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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}"
|
||||||
|
@ -252,7 +252,7 @@ advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then
|
if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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}"
|
||||||
|
@ -263,7 +263,7 @@ advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then
|
if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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}"
|
||||||
|
@ -275,7 +275,7 @@ advanced_settings() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3)
|
NET=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3)
|
||||||
exit_status=$?
|
exit_status=$?
|
||||||
if [ $exit_status -eq 0 ]; then
|
if [ $exit_status -eq 0 ]; then
|
||||||
if [ "$NET" = "dhcp" ]; then
|
if [ "$NET" = "dhcp" ]; then
|
||||||
|
@ -286,7 +286,7 @@ advanced_settings() {
|
||||||
echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
|
echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
whiptail --msgbox "$NET is an invalid IPv4 CIDR address. Please enter a valid IPv4 CIDR address or 'dhcp'" 8 58
|
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox "$NET is an invalid IPv4 CIDR address. Please enter a valid IPv4 CIDR address or 'dhcp'" 8 58
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
@ -296,11 +296,11 @@ advanced_settings() {
|
||||||
|
|
||||||
if [ "$NET" != "dhcp" ]; then
|
if [ "$NET" != "dhcp" ]; then
|
||||||
while true; do
|
while true; do
|
||||||
GATE1=$(whiptail --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3)
|
GATE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3)
|
||||||
if [ -z "$GATE1" ]; then
|
if [ -z "$GATE1" ]; then
|
||||||
whiptail --msgbox "Gateway IP address cannot be empty" 8 58
|
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox "Gateway IP address cannot be empty" 8 58
|
||||||
elif [[ ! "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then
|
elif [[ ! "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then
|
||||||
whiptail --msgbox "Invalid IP address format" 8 58
|
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox "Invalid IP address format" 8 58
|
||||||
else
|
else
|
||||||
GATE=",gw=$GATE1"
|
GATE=",gw=$GATE1"
|
||||||
echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
|
echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
|
||||||
|
@ -312,14 +312,14 @@ advanced_settings() {
|
||||||
echo -e "${DGN}Using Gateway IP Address: ${BGN}Default${CL}"
|
echo -e "${DGN}Using Gateway IP Address: ${BGN}Default${CL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then
|
||||||
DISABLEIP6="yes"
|
DISABLEIP6="yes"
|
||||||
else
|
else
|
||||||
DISABLEIP6="no"
|
DISABLEIP6="no"
|
||||||
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" 3>&1 1>&2 2>&3); then
|
if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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=""
|
||||||
|
@ -331,7 +331,7 @@ advanced_settings() {
|
||||||
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" 3>&1 1>&2 2>&3); then
|
if SD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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=""
|
||||||
|
@ -344,7 +344,7 @@ advanced_settings() {
|
||||||
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" 3>&1 1>&2 2>&3); then
|
if NX=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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=""
|
||||||
|
@ -356,7 +356,7 @@ advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
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 MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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=""
|
||||||
|
@ -368,7 +368,7 @@ advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then
|
if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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=""
|
||||||
|
@ -381,7 +381,7 @@ advanced_settings() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$PW" == -password* ]]; then
|
if [[ "$PW" == -password* ]]; then
|
||||||
if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then
|
||||||
SSH="yes"
|
SSH="yes"
|
||||||
else
|
else
|
||||||
SSH="no"
|
SSH="no"
|
||||||
|
@ -393,7 +393,7 @@ advanced_settings() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$APP" == "Docker" || "$APP" == "Umbrel" || "$APP" == "CasaOS" || "$APP" == "Home Assistant" ]]; then
|
if [[ "$APP" == "Docker" || "$APP" == "Umbrel" || "$APP" == "CasaOS" || "$APP" == "Home Assistant" ]]; then
|
||||||
if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then
|
||||||
FUSE="yes"
|
FUSE="yes"
|
||||||
else
|
else
|
||||||
FUSE="no"
|
FUSE="no"
|
||||||
|
@ -401,14 +401,14 @@ advanced_settings() {
|
||||||
echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}$FUSE${CL}"
|
echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}$FUSE${CL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then
|
||||||
VERB="yes"
|
VERB="yes"
|
||||||
else
|
else
|
||||||
VERB="no"
|
VERB="no"
|
||||||
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?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --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
|
||||||
|
@ -428,7 +428,7 @@ install_script() {
|
||||||
NEXTID=$(pvesh get /cluster/nextid)
|
NEXTID=$(pvesh get /cluster/nextid)
|
||||||
timezone=$(cat /etc/timezone)
|
timezone=$(cat /etc/timezone)
|
||||||
header_info
|
header_info
|
||||||
if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
|
||||||
header_info
|
header_info
|
||||||
echo -e "${BL}Using Default Settings${CL}"
|
echo -e "${BL}Using Default Settings${CL}"
|
||||||
default_settings
|
default_settings
|
||||||
|
@ -441,7 +441,7 @@ install_script() {
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
if command -v pveversion >/dev/null 2>&1; then
|
if command -v pveversion >/dev/null 2>&1; then
|
||||||
if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then
|
if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then
|
||||||
clear
|
clear
|
||||||
echo -e "⚠ User exited script \n"
|
echo -e "⚠ User exited script \n"
|
||||||
exit
|
exit
|
||||||
|
@ -450,7 +450,7 @@ start() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! command -v pveversion >/dev/null 2>&1; then
|
if ! command -v pveversion >/dev/null 2>&1; then
|
||||||
if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then
|
if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then
|
||||||
clear
|
clear
|
||||||
echo -e "⚠ User exited script \n"
|
echo -e "⚠ User exited script \n"
|
||||||
exit
|
exit
|
||||||
|
|
|
@ -43,7 +43,7 @@ while read -r line; do
|
||||||
fi
|
fi
|
||||||
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
||||||
done < <(pct list | awk 'NR>1')
|
done < <(pct list | awk 'NR>1')
|
||||||
excluded_containers=$(whiptail --title "Containers on $NODE" --checklist \
|
excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist \
|
||||||
"\nSelect containers to skip from cleaning:\n" \
|
"\nSelect containers to skip from cleaning:\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
||||||
|
|
|
@ -68,13 +68,13 @@ while read -r line; do
|
||||||
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
||||||
done < <(pct list | awk 'NR>1')
|
done < <(pct list | awk 'NR>1')
|
||||||
while [ -z "${CTID_FROM:+x}" ]; do
|
while [ -z "${CTID_FROM:+x}" ]; do
|
||||||
CTID_FROM=$(whiptail --title "$TITLE" --radiolist \
|
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich HA LXC would you like to copy FROM?\n" \
|
"\nWhich HA LXC would you like to copy FROM?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
done
|
done
|
||||||
while [ -z "${CTID_TO:+x}" ]; do
|
while [ -z "${CTID_TO:+x}" ]; do
|
||||||
CTID_TO=$(whiptail --title "$TITLE" --radiolist \
|
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich HA LXC would you like to copy TO?\n" \
|
"\nWhich HA LXC would you like to copy TO?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
|
@ -85,7 +85,7 @@ for i in ${!CTID_MENU[@]}; do
|
||||||
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
||||||
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
||||||
done
|
done
|
||||||
whiptail --defaultno --title "$TITLE" --yesno \
|
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
||||||
"Are you sure you want to copy data between the following LXCs?
|
"Are you sure you want to copy data between the following LXCs?
|
||||||
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
||||||
Version: 2022.01.23" 13 50 || exit
|
Version: 2022.01.23" 13 50 || exit
|
||||||
|
|
|
@ -66,13 +66,13 @@ while read -r line; do
|
||||||
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
||||||
done < <(pct list | awk 'NR>1')
|
done < <(pct list | awk 'NR>1')
|
||||||
while [ -z "${CTID_FROM:+x}" ]; do
|
while [ -z "${CTID_FROM:+x}" ]; do
|
||||||
CTID_FROM=$(whiptail --title "$TITLE" --radiolist \
|
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich HA Container LXC would you like to copy FROM?\n" \
|
"\nWhich HA Container LXC would you like to copy FROM?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
done
|
done
|
||||||
while [ -z "${CTID_TO:+x}" ]; do
|
while [ -z "${CTID_TO:+x}" ]; do
|
||||||
CTID_TO=$(whiptail --title "$TITLE" --radiolist \
|
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich HA Core LXC would you like to copy TO?\n" \
|
"\nWhich HA Core LXC would you like to copy TO?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
|
@ -83,7 +83,7 @@ for i in ${!CTID_MENU[@]}; do
|
||||||
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
||||||
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
||||||
done
|
done
|
||||||
whiptail --defaultno --title "$TITLE" --yesno \
|
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
||||||
"Are you sure you want to copy data between the following LXCs?
|
"Are you sure you want to copy data between the following LXCs?
|
||||||
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
||||||
Version: 2022.10.02" 13 50 || exit
|
Version: 2022.10.02" 13 50 || exit
|
||||||
|
|
|
@ -68,13 +68,13 @@ while read -r line; do
|
||||||
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
||||||
done < <(pct list | awk 'NR>1')
|
done < <(pct list | awk 'NR>1')
|
||||||
while [ -z "${CTID_FROM:+x}" ]; do
|
while [ -z "${CTID_FROM:+x}" ]; do
|
||||||
CTID_FROM=$(whiptail --title "$TITLE" --radiolist \
|
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich HA LXC would you like to copy FROM?\n" \
|
"\nWhich HA LXC would you like to copy FROM?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
done
|
done
|
||||||
while [ -z "${CTID_TO:+x}" ]; do
|
while [ -z "${CTID_TO:+x}" ]; do
|
||||||
CTID_TO=$(whiptail --title "$TITLE" --radiolist \
|
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich HA Podman LXC would you like to copy TO?\n" \
|
"\nWhich HA Podman LXC would you like to copy TO?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
|
@ -85,7 +85,7 @@ for i in ${!CTID_MENU[@]}; do
|
||||||
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
||||||
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
||||||
done
|
done
|
||||||
whiptail --defaultno --title "$TITLE" --yesno \
|
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
||||||
"Are you sure you want to copy data between the following LXCs?
|
"Are you sure you want to copy data between the following LXCs?
|
||||||
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
||||||
Version: 2022.02.12" 13 50 || exit
|
Version: 2022.02.12" 13 50 || exit
|
||||||
|
|
|
@ -66,13 +66,13 @@ while read -r line; do
|
||||||
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
||||||
done < <(pct list | awk 'NR>1')
|
done < <(pct list | awk 'NR>1')
|
||||||
while [ -z "${CTID_FROM:+x}" ]; do
|
while [ -z "${CTID_FROM:+x}" ]; do
|
||||||
CTID_FROM=$(whiptail --title "$TITLE" --radiolist \
|
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich HA Core LXC would you like to copy FROM?\n" \
|
"\nWhich HA Core LXC would you like to copy FROM?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
done
|
done
|
||||||
while [ -z "${CTID_TO:+x}" ]; do
|
while [ -z "${CTID_TO:+x}" ]; do
|
||||||
CTID_TO=$(whiptail --title "$TITLE" --radiolist \
|
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich HA Container LXC would you like to copy TO?\n" \
|
"\nWhich HA Container LXC would you like to copy TO?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
|
@ -83,7 +83,7 @@ for i in ${!CTID_MENU[@]}; do
|
||||||
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
||||||
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
||||||
done
|
done
|
||||||
whiptail --defaultno --title "$TITLE" --yesno \
|
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
||||||
"Are you sure you want to copy data between the following LXCs?
|
"Are you sure you want to copy data between the following LXCs?
|
||||||
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
||||||
Version: 2022.10.02" 13 50 || exit
|
Version: 2022.10.02" 13 50 || exit
|
||||||
|
|
|
@ -61,13 +61,13 @@ while read -r line; do
|
||||||
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
||||||
done < <(pct list | awk 'NR>1')
|
done < <(pct list | awk 'NR>1')
|
||||||
while [ -z "${CTID_FROM:+x}" ]; do
|
while [ -z "${CTID_FROM:+x}" ]; do
|
||||||
CTID_FROM=$(whiptail --title "$TITLE" --radiolist \
|
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich HA Core LXC would you like to copy FROM?\n" \
|
"\nWhich HA Core LXC would you like to copy FROM?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
done
|
done
|
||||||
while [ -z "${CTID_TO:+x}" ]; do
|
while [ -z "${CTID_TO:+x}" ]; do
|
||||||
CTID_TO=$(whiptail --title "$TITLE" --radiolist \
|
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich HA Core LXC would you like to copy TO?\n" \
|
"\nWhich HA Core LXC would you like to copy TO?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
|
@ -78,7 +78,7 @@ for i in ${!CTID_MENU[@]}; do
|
||||||
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
||||||
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
||||||
done
|
done
|
||||||
whiptail --defaultno --title "$TITLE" --yesno \
|
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
||||||
"Are you sure you want to copy data between the following LXCs?
|
"Are you sure you want to copy data between the following LXCs?
|
||||||
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
||||||
Version: 2022.10.03" 13 50 || exit
|
Version: 2022.10.03" 13 50 || exit
|
||||||
|
|
|
@ -68,13 +68,13 @@ while read -r line; do
|
||||||
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
||||||
done < <(pct list | awk 'NR>1')
|
done < <(pct list | awk 'NR>1')
|
||||||
while [ -z "${CTID_FROM:+x}" ]; do
|
while [ -z "${CTID_FROM:+x}" ]; do
|
||||||
CTID_FROM=$(whiptail --title "$TITLE" --radiolist \
|
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich Plex Media Server LXC would you like to copy FROM?\n" \
|
"\nWhich Plex Media Server LXC would you like to copy FROM?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
done
|
done
|
||||||
while [ -z "${CTID_TO:+x}" ]; do
|
while [ -z "${CTID_TO:+x}" ]; do
|
||||||
CTID_TO=$(whiptail --title "$TITLE" --radiolist \
|
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich Plex Media Server LXC would you like to copy TO?\n" \
|
"\nWhich Plex Media Server LXC would you like to copy TO?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
|
@ -85,7 +85,7 @@ for i in ${!CTID_MENU[@]}; do
|
||||||
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
||||||
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
||||||
done
|
done
|
||||||
whiptail --defaultno --title "$TITLE" --yesno \
|
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
||||||
"Are you sure you want to copy data between the following LXCs?
|
"Are you sure you want to copy data between the following LXCs?
|
||||||
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
||||||
Version: 2022.01.24" 13 50 || exit
|
Version: 2022.01.24" 13 50 || exit
|
||||||
|
|
|
@ -68,13 +68,13 @@ while read -r line; do
|
||||||
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
||||||
done < <(pct list | awk 'NR>1')
|
done < <(pct list | awk 'NR>1')
|
||||||
while [ -z "${CTID_FROM:+x}" ]; do
|
while [ -z "${CTID_FROM:+x}" ]; do
|
||||||
CTID_FROM=$(whiptail --title "$TITLE" --radiolist \
|
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich HA Podman LXC would you like to copy FROM?\n" \
|
"\nWhich HA Podman LXC would you like to copy FROM?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
done
|
done
|
||||||
while [ -z "${CTID_TO:+x}" ]; do
|
while [ -z "${CTID_TO:+x}" ]; do
|
||||||
CTID_TO=$(whiptail --title "$TITLE" --radiolist \
|
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich HA LXC would you like to copy TO?\n" \
|
"\nWhich HA LXC would you like to copy TO?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
|
@ -85,7 +85,7 @@ for i in ${!CTID_MENU[@]}; do
|
||||||
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
||||||
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
||||||
done
|
done
|
||||||
whiptail --defaultno --title "$TITLE" --yesno \
|
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
||||||
"Are you sure you want to copy data between the following LXCs?
|
"Are you sure you want to copy data between the following LXCs?
|
||||||
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
||||||
Version: 2022.03.31" 13 50 || exit
|
Version: 2022.03.31" 13 50 || exit
|
||||||
|
|
|
@ -68,13 +68,13 @@ while read -r line; do
|
||||||
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
||||||
done < <(pct list | awk 'NR>1')
|
done < <(pct list | awk 'NR>1')
|
||||||
while [ -z "${CTID_FROM:+x}" ]; do
|
while [ -z "${CTID_FROM:+x}" ]; do
|
||||||
CTID_FROM=$(whiptail --title "$TITLE" --radiolist \
|
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich Zigbee2MQTT LXC would you like to copy FROM?\n" \
|
"\nWhich Zigbee2MQTT LXC would you like to copy FROM?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
done
|
done
|
||||||
while [ -z "${CTID_TO:+x}" ]; do
|
while [ -z "${CTID_TO:+x}" ]; do
|
||||||
CTID_TO=$(whiptail --title "$TITLE" --radiolist \
|
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich Zigbee2MQTT LXC would you like to copy TO?\n" \
|
"\nWhich Zigbee2MQTT LXC would you like to copy TO?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
|
@ -85,7 +85,7 @@ for i in ${!CTID_MENU[@]}; do
|
||||||
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
||||||
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
||||||
done
|
done
|
||||||
whiptail --defaultno --title "$TITLE" --yesno \
|
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
||||||
"Are you sure you want to copy data between the following LXCs?
|
"Are you sure you want to copy data between the following LXCs?
|
||||||
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
||||||
Version: 2022.01.23" 13 50 || exit
|
Version: 2022.01.23" 13 50 || exit
|
||||||
|
|
|
@ -69,13 +69,13 @@ while read -r line; do
|
||||||
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
||||||
done < <(pct list | awk 'NR>1')
|
done < <(pct list | awk 'NR>1')
|
||||||
while [ -z "${CTID_FROM:+x}" ]; do
|
while [ -z "${CTID_FROM:+x}" ]; do
|
||||||
CTID_FROM=$(whiptail --title "$TITLE" --radiolist \
|
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich Zwavejs2MQTT LXC would you like to copy FROM?\n" \
|
"\nWhich Zwavejs2MQTT LXC would you like to copy FROM?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
done
|
done
|
||||||
while [ -z "${CTID_TO:+x}" ]; do
|
while [ -z "${CTID_TO:+x}" ]; do
|
||||||
CTID_TO=$(whiptail --title "$TITLE" --radiolist \
|
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich Z-wave JS UI LXC would you like to copy TO?\n" \
|
"\nWhich Z-wave JS UI LXC would you like to copy TO?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
|
@ -86,7 +86,7 @@ for i in ${!CTID_MENU[@]}; do
|
||||||
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
||||||
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
||||||
done
|
done
|
||||||
whiptail --defaultno --title "$TITLE" --yesno \
|
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
||||||
"Are you sure you want to copy data between the following LXCs?
|
"Are you sure you want to copy data between the following LXCs?
|
||||||
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
||||||
Version: 2022.09.21" 13 50 || exit
|
Version: 2022.09.21" 13 50 || exit
|
||||||
|
|
|
@ -39,7 +39,7 @@ remove() {
|
||||||
OPTIONS=(Add "Add Crontab Schedule"
|
OPTIONS=(Add "Add Crontab Schedule"
|
||||||
Remove "Remove Crontab Schedule")
|
Remove "Remove Crontab Schedule")
|
||||||
|
|
||||||
CHOICE=$(whiptail --title "Cron Update LXCs" --menu "Select an option:" 10 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Cron Update LXCs" --menu "Select an option:" 10 58 2 \
|
||||||
"${OPTIONS[@]}" 3>&1 1>&2 2>&3)
|
"${OPTIONS[@]}" 3>&1 1>&2 2>&3)
|
||||||
|
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
|
|
@ -71,7 +71,7 @@ done < <(pct list | awk 'NR>1')
|
||||||
|
|
||||||
# Selection menu for LXC containers
|
# Selection menu for LXC containers
|
||||||
while [ -z "${CTID:+x}" ]; do
|
while [ -z "${CTID:+x}" ]; do
|
||||||
CTID=$(whiptail --title "Containers on $NODE" --radiolist \
|
CTID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --radiolist \
|
||||||
"\nSelect a container to add support:\n" \
|
"\nSelect a container to add support:\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
|
|
|
@ -40,7 +40,7 @@ while read -r dir; do
|
||||||
done < <(ls -d /etc/*)
|
done < <(ls -d /etc/*)
|
||||||
|
|
||||||
while [ -z "${HOST_BACKUP:+x}" ]; do
|
while [ -z "${HOST_BACKUP:+x}" ]; do
|
||||||
HOST_BACKUP=$(whiptail --title "SELECTIONS" --checklist \
|
HOST_BACKUP=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SELECTIONS" --checklist \
|
||||||
"\nSelect what files/directories to backup:\n" \
|
"\nSelect what files/directories to backup:\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 58)) 6 \
|
16 $(($MSG_MAX_LENGTH + 58)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
|
|
|
@ -130,7 +130,7 @@ OPTIONS=(Add "Add Monitor-All to Proxmox VE" \
|
||||||
Remove "Remove Monitor-All from Proxmox VE")
|
Remove "Remove Monitor-All from Proxmox VE")
|
||||||
|
|
||||||
# Show the whiptail menu and save the user's choice
|
# Show the whiptail menu and save the user's choice
|
||||||
CHOICE=$(whiptail --title "Monitor-All for Proxmox VE" --menu "Select an option:" 10 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Monitor-All for Proxmox VE" --menu "Select an option:" 10 58 2 \
|
||||||
"${OPTIONS[@]}" 3>&1 1>&2 2>&3)
|
"${OPTIONS[@]}" 3>&1 1>&2 2>&3)
|
||||||
|
|
||||||
# Check the user's choice and perform the corresponding action
|
# Check the user's choice and perform the corresponding action
|
||||||
|
|
|
@ -47,7 +47,7 @@ msg_error() {
|
||||||
|
|
||||||
start_routines() {
|
start_routines() {
|
||||||
header_info
|
header_info
|
||||||
CHOICE=$(whiptail --title "PBS 2 BACKUP" --menu "\nMake a backup of /etc/proxmox-backup to ensure that in the worst case, any relevant configuration can be recovered?" 14 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS 2 BACKUP" --menu "\nMake a backup of /etc/proxmox-backup to ensure that in the worst case, any relevant configuration can be recovered?" 14 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
@ -61,7 +61,7 @@ start_routines() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CHOICE=$(whiptail --title "PBS 3 SOURCES" --menu "This will set the correct sources to update and install Proxmox Backup Server 3.\n \nChange to Proxmox Backup Server 3 sources?" 14 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS 3 SOURCES" --menu "This will set the correct sources to update and install Proxmox Backup Server 3.\n \nChange to Proxmox Backup Server 3 sources?" 14 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
@ -79,7 +79,7 @@ EOF
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CHOICE=$(whiptail --title "PBS3-ENTERPRISE" --menu "The 'pbs-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pbs-enterprise' repository?" 14 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS3-ENTERPRISE" --menu "The 'pbs-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pbs-enterprise' repository?" 14 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
@ -95,7 +95,7 @@ EOF
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CHOICE=$(whiptail --title "PBS3-NO-SUBSCRIPTION" --menu "The 'pbs-no-subscription' repository provides access to all of the open-source components of Proxmox Backup Server.\n \nEnable 'pbs-no-subscription' repository?" 14 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS3-NO-SUBSCRIPTION" --menu "The 'pbs-no-subscription' repository provides access to all of the open-source components of Proxmox Backup Server.\n \nEnable 'pbs-no-subscription' repository?" 14 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
@ -111,7 +111,7 @@ EOF
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CHOICE=$(whiptail --title "PBS3 TEST" --menu "The 'pbstest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pbstest' repository?" 14 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS3 TEST" --menu "The 'pbstest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pbstest' repository?" 14 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
@ -127,7 +127,7 @@ EOF
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CHOICE=$(whiptail --title "PBS 3 UPDATE" --menu "\nUpdate to Proxmox Backup Server 3 now?" 11 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS 3 UPDATE" --menu "\nUpdate to Proxmox Backup Server 3 now?" 11 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
@ -142,7 +142,7 @@ EOF
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CHOICE=$(whiptail --title "REBOOT" --menu "\nReboot Proxmox Backup Server 3 now? (recommended)" 11 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "REBOOT" --menu "\nReboot Proxmox Backup Server 3 now? (recommended)" 11 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
|
|
@ -48,7 +48,7 @@ msg_error() {
|
||||||
start_routines() {
|
start_routines() {
|
||||||
header_info
|
header_info
|
||||||
VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)"
|
VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)"
|
||||||
CHOICE=$(whiptail --title "PBS SOURCES" --menu "This will set the correct sources to update and install Proxmox Backup Server.\n \nChange to Proxmox Backup Server sources?" 14 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS SOURCES" --menu "This will set the correct sources to update and install Proxmox Backup Server.\n \nChange to Proxmox Backup Server sources?" 14 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
@ -66,7 +66,7 @@ EOF
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CHOICE=$(whiptail --title "PBS-ENTERPRISE" --menu "The 'pbs-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pbs-enterprise' repository?" 14 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS-ENTERPRISE" --menu "The 'pbs-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pbs-enterprise' repository?" 14 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
@ -82,7 +82,7 @@ EOF
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CHOICE=$(whiptail --title "PBS-NO-SUBSCRIPTION" --menu "The 'pbs-no-subscription' repository provides access to all of the open-source components of Proxmox Backup Server.\n \nEnable 'pbs-no-subscription' repository?" 14 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS-NO-SUBSCRIPTION" --menu "The 'pbs-no-subscription' repository provides access to all of the open-source components of Proxmox Backup Server.\n \nEnable 'pbs-no-subscription' repository?" 14 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
@ -98,7 +98,7 @@ EOF
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CHOICE=$(whiptail --title "PBS TEST" --menu "The 'pbstest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pbstest' repository?" 14 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS TEST" --menu "The 'pbstest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pbstest' repository?" 14 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
@ -115,25 +115,25 @@ EOF
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ ! -f /etc/apt/apt.conf.d/no-nag-script ]]; then
|
if [[ ! -f /etc/apt/apt.conf.d/no-nag-script ]]; then
|
||||||
CHOICE=$(whiptail --title "SUBSCRIPTION NAG" --menu "This will disable the nag message reminding you to purchase a subscription every time you log in to the web interface.\n \nDisable subscription nag?" 14 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUBSCRIPTION NAG" --menu "This will disable the nag message reminding you to purchase a subscription every time you log in to the web interface.\n \nDisable subscription nag?" 14 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
yes)
|
yes)
|
||||||
whiptail --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58
|
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58
|
||||||
msg_info "Disabling subscription nag"
|
msg_info "Disabling subscription nag"
|
||||||
echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script
|
echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script
|
||||||
apt --reinstall install proxmox-widget-toolkit &>/dev/null
|
apt --reinstall install proxmox-widget-toolkit &>/dev/null
|
||||||
msg_ok "Disabled subscription nag (Delete browser cache)"
|
msg_ok "Disabled subscription nag (Delete browser cache)"
|
||||||
;;
|
;;
|
||||||
no)
|
no)
|
||||||
whiptail --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58
|
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58
|
||||||
msg_error "Selected no to Disabling subscription nag"
|
msg_error "Selected no to Disabling subscription nag"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CHOICE=$(whiptail --title "UPDATE" --menu "\nUpdate Proxmox Backup Server now?" 11 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UPDATE" --menu "\nUpdate Proxmox Backup Server now?" 11 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
@ -148,7 +148,7 @@ EOF
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CHOICE=$(whiptail --title "REBOOT" --menu "\nReboot Proxmox Backup Server now? (recommended)" 11 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "REBOOT" --menu "\nReboot Proxmox Backup Server now? (recommended)" 11 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
|
|
@ -48,10 +48,10 @@ start_routines() {
|
||||||
header_info
|
header_info
|
||||||
VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)"
|
VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)"
|
||||||
if lscpu | grep -qP 'Vendor ID:.*GenuineIntel' && lscpu | grep -qP 'Model name:.*N' && [[ "$VERSION" == "bullseye" ]]; then
|
if lscpu | grep -qP 'Vendor ID:.*GenuineIntel' && lscpu | grep -qP 'Model name:.*N' && [[ "$VERSION" == "bullseye" ]]; then
|
||||||
whiptail --msgbox --title "N-SERIES PROCESSOR DETECTED" "To ensure compatibility with Proxmox VE on systems equipped with N-series processors, it is recommended to install Proxmox Virtual Environment 8" 10 58
|
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "N-SERIES PROCESSOR DETECTED" "To ensure compatibility with Proxmox VE on systems equipped with N-series processors, it is recommended to install Proxmox Virtual Environment 8" 10 58
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CHOICE=$(whiptail --title "SOURCES" --menu "The package manager will use the correct sources to update and install packages on your Proxmox VE server.\n \nCorrect Proxmox VE sources?" 14 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SOURCES" --menu "The package manager will use the correct sources to update and install packages on your Proxmox VE server.\n \nCorrect Proxmox VE sources?" 14 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
@ -69,7 +69,7 @@ EOF
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CHOICE=$(whiptail --title "PVE-ENTERPRISE" --menu "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pve-enterprise' repository?" 14 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PVE-ENTERPRISE" --menu "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pve-enterprise' repository?" 14 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
@ -85,7 +85,7 @@ EOF
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CHOICE=$(whiptail --title "PVE-NO-SUBSCRIPTION" --menu "The 'pve-no-subscription' repository provides access to all of the open-source components of Proxmox VE.\n \nEnable 'pve-no-subscription' repository?" 14 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PVE-NO-SUBSCRIPTION" --menu "The 'pve-no-subscription' repository provides access to all of the open-source components of Proxmox VE.\n \nEnable 'pve-no-subscription' repository?" 14 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
@ -102,7 +102,7 @@ EOF
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "${VERSION}" == "bookworm" ]]; then
|
if [[ "${VERSION}" == "bookworm" ]]; then
|
||||||
CHOICE=$(whiptail --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription'(enabled) and 'enterprise'(disabled) repositories.\n \nAdd 'ceph package repositories?" 14 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription'(enabled) and 'enterprise'(disabled) repositories.\n \nAdd 'ceph package repositories?" 14 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
@ -120,7 +120,7 @@ EOF
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CHOICE=$(whiptail --title "PVETEST" --menu "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pvetest' repository?" 14 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PVETEST" --menu "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pvetest' repository?" 14 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
@ -137,26 +137,26 @@ EOF
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ ! -f /etc/apt/apt.conf.d/no-nag-script ]]; then
|
if [[ ! -f /etc/apt/apt.conf.d/no-nag-script ]]; then
|
||||||
CHOICE=$(whiptail --title "SUBSCRIPTION NAG" --menu "This will disable the nag message reminding you to purchase a subscription every time you log in to the web interface.\n \nDisable subscription nag?" 14 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUBSCRIPTION NAG" --menu "This will disable the nag message reminding you to purchase a subscription every time you log in to the web interface.\n \nDisable subscription nag?" 14 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
yes)
|
yes)
|
||||||
whiptail --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58
|
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58
|
||||||
msg_info "Disabling subscription nag"
|
msg_info "Disabling subscription nag"
|
||||||
echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script
|
echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script
|
||||||
apt --reinstall install proxmox-widget-toolkit &>/dev/null
|
apt --reinstall install proxmox-widget-toolkit &>/dev/null
|
||||||
msg_ok "Disabled subscription nag (Delete browser cache)"
|
msg_ok "Disabled subscription nag (Delete browser cache)"
|
||||||
;;
|
;;
|
||||||
no)
|
no)
|
||||||
whiptail --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58
|
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58
|
||||||
msg_error "Selected no to Disabling subscription nag"
|
msg_error "Selected no to Disabling subscription nag"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! systemctl is-active --quiet pve-ha-lrm; then
|
if ! systemctl is-active --quiet pve-ha-lrm; then
|
||||||
CHOICE=$(whiptail --title "HIGH AVAILABILITY" --menu "Enable high availability?" 10 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "HIGH AVAILABILITY" --menu "Enable high availability?" 10 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
@ -174,7 +174,7 @@ EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if systemctl is-active --quiet pve-ha-lrm; then
|
if systemctl is-active --quiet pve-ha-lrm; then
|
||||||
CHOICE=$(whiptail --title "HIGH AVAILABILITY" --menu "If you plan to utilize a single node instead of a clustered environment, you can disable unnecessary high availability (HA) services, thus reclaiming system resources.\n\nIf HA becomes necessary at a later stage, the services can be re-enabled.\n\nDisable high availability?" 18 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "HIGH AVAILABILITY" --menu "If you plan to utilize a single node instead of a clustered environment, you can disable unnecessary high availability (HA) services, thus reclaiming system resources.\n\nIf HA becomes necessary at a later stage, the services can be re-enabled.\n\nDisable high availability?" 18 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
@ -191,7 +191,7 @@ EOF
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CHOICE=$(whiptail --title "UPDATE" --menu "\nUpdate Proxmox VE now?" 11 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UPDATE" --menu "\nUpdate Proxmox VE now?" 11 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
@ -206,7 +206,7 @@ EOF
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CHOICE=$(whiptail --title "REBOOT" --menu "\nReboot Proxmox VE now? (recommended)" 11 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "REBOOT" --menu "\nReboot Proxmox VE now? (recommended)" 11 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
|
|
@ -47,7 +47,7 @@ msg_error() {
|
||||||
start_routines() {
|
start_routines() {
|
||||||
header_info
|
header_info
|
||||||
|
|
||||||
whiptail --msgbox --title "PVE8 SOURCES" "This will set the correct sources to update and install Proxmox VE 8." 10 58
|
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "PVE8 SOURCES" "This will set the correct sources to update and install Proxmox VE 8." 10 58
|
||||||
msg_info "Changing to Proxmox VE 8 Sources"
|
msg_info "Changing to Proxmox VE 8 Sources"
|
||||||
cat <<EOF >/etc/apt/sources.list
|
cat <<EOF >/etc/apt/sources.list
|
||||||
deb http://ftp.debian.org/debian bookworm main contrib
|
deb http://ftp.debian.org/debian bookworm main contrib
|
||||||
|
@ -56,21 +56,21 @@ deb http://security.debian.org/debian-security bookworm-security main contrib
|
||||||
EOF
|
EOF
|
||||||
msg_ok "Changed to Proxmox VE 8 Sources"
|
msg_ok "Changed to Proxmox VE 8 Sources"
|
||||||
|
|
||||||
whiptail --msgbox --title "PVE8-ENTERPRISE" "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription." 10 58
|
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "PVE8-ENTERPRISE" "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription." 10 58
|
||||||
msg_info "Disabling 'pve-enterprise' repository"
|
msg_info "Disabling 'pve-enterprise' repository"
|
||||||
cat <<EOF >/etc/apt/sources.list.d/pve-enterprise.list
|
cat <<EOF >/etc/apt/sources.list.d/pve-enterprise.list
|
||||||
# deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise
|
# deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise
|
||||||
EOF
|
EOF
|
||||||
msg_ok "Disabled 'pve-enterprise' repository"
|
msg_ok "Disabled 'pve-enterprise' repository"
|
||||||
|
|
||||||
whiptail --msgbox --title "PVE8-NO-SUBSCRIPTION" "The 'pve-no-subscription' repository provides access to all of the open-source components of Proxmox VE." 10 58
|
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "PVE8-NO-SUBSCRIPTION" "The 'pve-no-subscription' repository provides access to all of the open-source components of Proxmox VE." 10 58
|
||||||
msg_info "Enabling 'pve-no-subscription' repository"
|
msg_info "Enabling 'pve-no-subscription' repository"
|
||||||
cat <<EOF >/etc/apt/sources.list.d/pve-install-repo.list
|
cat <<EOF >/etc/apt/sources.list.d/pve-install-repo.list
|
||||||
deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription
|
deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription
|
||||||
EOF
|
EOF
|
||||||
msg_ok "Enabled 'pve-no-subscription' repository"
|
msg_ok "Enabled 'pve-no-subscription' repository"
|
||||||
|
|
||||||
whiptail --msgbox --title "PVE8 CEPH PACKAGE REPOSITORIES" "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories." 10 58
|
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "PVE8 CEPH PACKAGE REPOSITORIES" "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories." 10 58
|
||||||
msg_info "Enabling 'ceph package repositories'"
|
msg_info "Enabling 'ceph package repositories'"
|
||||||
cat <<EOF >/etc/apt/sources.list.d/ceph.list
|
cat <<EOF >/etc/apt/sources.list.d/ceph.list
|
||||||
# deb http://download.proxmox.com/debian/ceph-quincy bookworm enterprise
|
# deb http://download.proxmox.com/debian/ceph-quincy bookworm enterprise
|
||||||
|
@ -78,20 +78,20 @@ deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription
|
||||||
EOF
|
EOF
|
||||||
msg_ok "Enabled 'ceph package repositories'"
|
msg_ok "Enabled 'ceph package repositories'"
|
||||||
|
|
||||||
whiptail --msgbox --title "PVE8 TEST" "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released (Disabled)." 10 58
|
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "PVE8 TEST" "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released (Disabled)." 10 58
|
||||||
msg_info "Adding 'pvetest' repository and set disabled"
|
msg_info "Adding 'pvetest' repository and set disabled"
|
||||||
cat <<EOF >/etc/apt/sources.list.d/pvetest-for-beta.list
|
cat <<EOF >/etc/apt/sources.list.d/pvetest-for-beta.list
|
||||||
# deb http://download.proxmox.com/debian/pve bookworm pvetest
|
# deb http://download.proxmox.com/debian/pve bookworm pvetest
|
||||||
EOF
|
EOF
|
||||||
msg_ok "Added 'pvetest' repository"
|
msg_ok "Added 'pvetest' repository"
|
||||||
|
|
||||||
whiptail --msgbox --title "PVE8 UPDATE" "Updating to Proxmox VE 8" 10 58
|
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "PVE8 UPDATE" "Updating to Proxmox VE 8" 10 58
|
||||||
msg_info "Updating to Proxmox VE 8 (Patience)"
|
msg_info "Updating to Proxmox VE 8 (Patience)"
|
||||||
apt-get update
|
apt-get update
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" dist-upgrade -y
|
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" dist-upgrade -y
|
||||||
msg_ok "Updated to Proxmox VE 8"
|
msg_ok "Updated to Proxmox VE 8"
|
||||||
|
|
||||||
CHOICE=$(whiptail --title "REBOOT" --menu "\nReboot Proxmox VE 8 now? (recommended)" 11 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "REBOOT" --menu "\nReboot Proxmox VE 8 now? (recommended)" 11 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
|
|
@ -44,7 +44,7 @@ while read -r line; do
|
||||||
fi
|
fi
|
||||||
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
CTID_MENU+=("$TAG" "$ITEM " "OFF")
|
||||||
done < <(pct list | awk 'NR>1')
|
done < <(pct list | awk 'NR>1')
|
||||||
excluded_containers=$(whiptail --title "Containers on $NODE" --checklist \
|
excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist \
|
||||||
"\nSelect containers to skip from updates:\n" \
|
"\nSelect containers to skip from updates:\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
||||||
|
|
|
@ -113,7 +113,7 @@ function select_storage() {
|
||||||
else
|
else
|
||||||
local STORAGE
|
local STORAGE
|
||||||
while [ -z "${STORAGE:+x}" ]; do
|
while [ -z "${STORAGE:+x}" ]; do
|
||||||
STORAGE=$(whiptail --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
||||||
|
|
|
@ -113,7 +113,7 @@ function select_storage() {
|
||||||
else
|
else
|
||||||
local STORAGE
|
local STORAGE
|
||||||
while [ -z "${STORAGE:+x}" ]; do
|
while [ -z "${STORAGE:+x}" ]; do
|
||||||
STORAGE=$(whiptail --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
||||||
|
|
|
@ -113,7 +113,7 @@ function select_storage() {
|
||||||
else
|
else
|
||||||
local STORAGE
|
local STORAGE
|
||||||
while [ -z "${STORAGE:+x}" ]; do
|
while [ -z "${STORAGE:+x}" ]; do
|
||||||
STORAGE=$(whiptail --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
||||||
|
|
|
@ -113,7 +113,7 @@ function select_storage() {
|
||||||
else
|
else
|
||||||
local STORAGE
|
local STORAGE
|
||||||
while [ -z "${STORAGE:+x}" ]; do
|
while [ -z "${STORAGE:+x}" ]; do
|
||||||
STORAGE=$(whiptail --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
||||||
|
|
|
@ -113,7 +113,7 @@ function select_storage() {
|
||||||
else
|
else
|
||||||
local STORAGE
|
local STORAGE
|
||||||
while [ -z "${STORAGE:+x}" ]; do
|
while [ -z "${STORAGE:+x}" ]; do
|
||||||
STORAGE=$(whiptail --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
||||||
|
|
|
@ -113,7 +113,7 @@ function select_storage() {
|
||||||
else
|
else
|
||||||
local STORAGE
|
local STORAGE
|
||||||
while [ -z "${STORAGE:+x}" ]; do
|
while [ -z "${STORAGE:+x}" ]; do
|
||||||
STORAGE=$(whiptail --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
||||||
|
|
|
@ -113,7 +113,7 @@ function select_storage() {
|
||||||
else
|
else
|
||||||
local STORAGE
|
local STORAGE
|
||||||
while [ -z "${STORAGE:+x}" ]; do
|
while [ -z "${STORAGE:+x}" ]; do
|
||||||
STORAGE=$(whiptail --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
||||||
|
|
|
@ -113,7 +113,7 @@ function select_storage() {
|
||||||
else
|
else
|
||||||
local STORAGE
|
local STORAGE
|
||||||
while [ -z "${STORAGE:+x}" ]; do
|
while [ -z "${STORAGE:+x}" ]; do
|
||||||
STORAGE=$(whiptail --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
||||||
|
|
|
@ -113,7 +113,7 @@ function select_storage() {
|
||||||
else
|
else
|
||||||
local STORAGE
|
local STORAGE
|
||||||
while [ -z "${STORAGE:+x}" ]; do
|
while [ -z "${STORAGE:+x}" ]; do
|
||||||
STORAGE=$(whiptail --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
||||||
|
|
|
@ -113,7 +113,7 @@ function select_storage() {
|
||||||
else
|
else
|
||||||
local STORAGE
|
local STORAGE
|
||||||
while [ -z "${STORAGE:+x}" ]; do
|
while [ -z "${STORAGE:+x}" ]; do
|
||||||
STORAGE=$(whiptail --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
||||||
|
|
|
@ -113,7 +113,7 @@ function select_storage() {
|
||||||
else
|
else
|
||||||
local STORAGE
|
local STORAGE
|
||||||
while [ -z "${STORAGE:+x}" ]; do
|
while [ -z "${STORAGE:+x}" ]; do
|
||||||
STORAGE=$(whiptail --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
||||||
|
|
|
@ -113,7 +113,7 @@ function select_storage() {
|
||||||
else
|
else
|
||||||
local STORAGE
|
local STORAGE
|
||||||
while [ -z "${STORAGE:+x}" ]; do
|
while [ -z "${STORAGE:+x}" ]; do
|
||||||
STORAGE=$(whiptail --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\n\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
"${MENU[@]}" 3>&1 1>&2 2>&3) || die "Menu aborted."
|
||||||
|
|
|
@ -63,7 +63,7 @@ function cleanup() {
|
||||||
|
|
||||||
TEMP_DIR=$(mktemp -d)
|
TEMP_DIR=$(mktemp -d)
|
||||||
pushd $TEMP_DIR >/dev/null
|
pushd $TEMP_DIR >/dev/null
|
||||||
if whiptail --title "HOME ASSISTANT OS VM" --yesno "This will create a New Home Assistant OS VM. Proceed?" 10 58; then
|
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "HOME ASSISTANT OS VM" --yesno "This will create a New Home Assistant OS VM. Proceed?" 10 58; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
header_info && echo -e "⚠ User exited script \n" && exit
|
header_info && echo -e "⚠ User exited script \n" && exit
|
||||||
|
@ -106,7 +106,7 @@ function arch_check() {
|
||||||
function ssh_check() {
|
function ssh_check() {
|
||||||
if command -v pveversion >/dev/null 2>&1; then
|
if command -v pveversion >/dev/null 2>&1; then
|
||||||
if [ -n "${SSH_CLIENT:+x}" ]; then
|
if [ -n "${SSH_CLIENT:+x}" ]; then
|
||||||
if whiptail --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then
|
if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then
|
||||||
echo "you've been warned"
|
echo "you've been warned"
|
||||||
else
|
else
|
||||||
clear
|
clear
|
||||||
|
@ -154,7 +154,7 @@ function default_settings() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function advanced_settings() {
|
function advanced_settings() {
|
||||||
if BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \
|
if BRANCH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \
|
||||||
"$stable" "Stable " ON \
|
"$stable" "Stable " ON \
|
||||||
"$beta" "Beta " OFF \
|
"$beta" "Beta " OFF \
|
||||||
"$dev" "Dev " OFF \
|
"$dev" "Dev " OFF \
|
||||||
|
@ -165,7 +165,7 @@ function advanced_settings() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
if VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z "$VMID" ]; then
|
if [ -z "$VMID" ]; then
|
||||||
VMID="$NEXTID"
|
VMID="$NEXTID"
|
||||||
fi
|
fi
|
||||||
|
@ -181,7 +181,7 @@ function advanced_settings() {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if MACH=$(whiptail --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \
|
if MACH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \
|
||||||
"i440fx" "Machine i440fx" ON \
|
"i440fx" "Machine i440fx" ON \
|
||||||
"q35" "Machine q35" OFF \
|
"q35" "Machine q35" OFF \
|
||||||
3>&1 1>&2 2>&3); then
|
3>&1 1>&2 2>&3); then
|
||||||
|
@ -198,7 +198,7 @@ function advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if DISK_CACHE1=$(whiptail --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \
|
if DISK_CACHE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \
|
||||||
"0" "Default" ON \
|
"0" "Default" ON \
|
||||||
"1" "Write Through" OFF \
|
"1" "Write Through" OFF \
|
||||||
3>&1 1>&2 2>&3); then
|
3>&1 1>&2 2>&3); then
|
||||||
|
@ -213,7 +213,7 @@ function advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $VM_NAME ]; then
|
if [ -z $VM_NAME ]; then
|
||||||
HN="haos${BRANCH}"
|
HN="haos${BRANCH}"
|
||||||
echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
|
echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
|
||||||
|
@ -225,7 +225,7 @@ function advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if CPU_TYPE1=$(whiptail --title "CPU MODEL" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \
|
if CPU_TYPE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU MODEL" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \
|
||||||
"0" "KVM64 (Default)" ON \
|
"0" "KVM64 (Default)" ON \
|
||||||
"1" "Host" OFF \
|
"1" "Host" OFF \
|
||||||
3>&1 1>&2 2>&3); then
|
3>&1 1>&2 2>&3); then
|
||||||
|
@ -240,7 +240,7 @@ function advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $CORE_COUNT ]; then
|
if [ -z $CORE_COUNT ]; then
|
||||||
CORE_COUNT="2"
|
CORE_COUNT="2"
|
||||||
echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
|
echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
|
@ -251,7 +251,7 @@ function advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $RAM_SIZE ]; then
|
if [ -z $RAM_SIZE ]; then
|
||||||
RAM_SIZE="4096"
|
RAM_SIZE="4096"
|
||||||
echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
|
echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
|
||||||
|
@ -262,7 +262,7 @@ function advanced_settings() {
|
||||||
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 --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 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}"
|
||||||
|
@ -273,7 +273,7 @@ function advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $MAC1 ]; then
|
if [ -z $MAC1 ]; then
|
||||||
MAC="$GEN_MAC"
|
MAC="$GEN_MAC"
|
||||||
echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}"
|
echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}"
|
||||||
|
@ -285,7 +285,7 @@ function advanced_settings() {
|
||||||
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 --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $VLAN1 ]; then
|
if [ -z $VLAN1 ]; then
|
||||||
VLAN1="Default"
|
VLAN1="Default"
|
||||||
VLAN=""
|
VLAN=""
|
||||||
|
@ -298,7 +298,7 @@ function advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
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 --backtitle "Proxmox VE Helper Scripts" --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 [ -z $MTU1 ]; then
|
if [ -z $MTU1 ]; then
|
||||||
MTU1="Default"
|
MTU1="Default"
|
||||||
MTU=""
|
MTU=""
|
||||||
|
@ -311,7 +311,7 @@ function advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
||||||
echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}"
|
echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}"
|
||||||
START_VM="yes"
|
START_VM="yes"
|
||||||
else
|
else
|
||||||
|
@ -319,7 +319,7 @@ function advanced_settings() {
|
||||||
START_VM="no"
|
START_VM="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" --no-button Do-Over 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" --no-button Do-Over 10 58); then
|
||||||
echo -e "${RD}Creating a HAOS VM using the above advanced settings${CL}"
|
echo -e "${RD}Creating a HAOS VM using the above advanced settings${CL}"
|
||||||
else
|
else
|
||||||
header_info
|
header_info
|
||||||
|
@ -329,7 +329,7 @@ function advanced_settings() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function start_script() {
|
function start_script() {
|
||||||
if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
|
||||||
header_info
|
header_info
|
||||||
echo -e "${BL}Using Default Settings${CL}"
|
echo -e "${BL}Using Default Settings${CL}"
|
||||||
default_settings
|
default_settings
|
||||||
|
@ -365,7 +365,7 @@ elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then
|
||||||
STORAGE=${STORAGE_MENU[0]}
|
STORAGE=${STORAGE_MENU[0]}
|
||||||
else
|
else
|
||||||
while [ -z "${STORAGE:+x}" ]; do
|
while [ -z "${STORAGE:+x}" ]; do
|
||||||
STORAGE=$(whiptail --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
|
|
|
@ -69,7 +69,7 @@ pushd $TEMP_DIR >/dev/null
|
||||||
sleep 3
|
sleep 3
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
if (whiptail --title "Mikrotik RouterOS VM" --yesno "This will create a New Mikrotik RouterOS VM. Proceed?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "Mikrotik RouterOS VM" --yesno "This will create a New Mikrotik RouterOS VM. Proceed?" 10 58); then
|
||||||
echo "User selected Yes"
|
echo "User selected Yes"
|
||||||
else
|
else
|
||||||
clear
|
clear
|
||||||
|
@ -107,14 +107,14 @@ function default_settings() {
|
||||||
echo -e "${BL}Creating a Mikrotik RouterOS VM using the above default settings${CL}"
|
echo -e "${BL}Creating a Mikrotik RouterOS VM using the above default settings${CL}"
|
||||||
}
|
}
|
||||||
function advanced_settings() {
|
function advanced_settings() {
|
||||||
VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" 3>&1 1>&2 2>&3)
|
VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" 3>&1 1>&2 2>&3)
|
||||||
exitstatus=$?
|
exitstatus=$?
|
||||||
if [ $exitstatus = 0 ]; then
|
if [ $exitstatus = 0 ]; then
|
||||||
echo -e "${DGN}Using Virtual Machine ID: ${BGN}$VMID${CL}"
|
echo -e "${DGN}Using Virtual Machine ID: ${BGN}$VMID${CL}"
|
||||||
else
|
else
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 Mikrotik-RouterOS --title "HOSTNAME" 3>&1 1>&2 2>&3)
|
VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 Mikrotik-RouterOS --title "HOSTNAME" 3>&1 1>&2 2>&3)
|
||||||
exitstatus=$?
|
exitstatus=$?
|
||||||
if [ $exitstatus = 0 ]; then
|
if [ $exitstatus = 0 ]; then
|
||||||
HN=$(echo ${VM_NAME,,} | tr -d ' ')
|
HN=$(echo ${VM_NAME,,} | tr -d ' ')
|
||||||
|
@ -122,28 +122,28 @@ function advanced_settings() {
|
||||||
else
|
else
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 1 --title "CORE COUNT" 3>&1 1>&2 2>&3)
|
CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 1 --title "CORE COUNT" 3>&1 1>&2 2>&3)
|
||||||
exitstatus=$?
|
exitstatus=$?
|
||||||
if [ $exitstatus = 0 ]; then
|
if [ $exitstatus = 0 ]; then
|
||||||
echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
|
echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
else
|
else
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 1024 --title "RAM" 3>&1 1>&2 2>&3)
|
RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 1024 --title "RAM" 3>&1 1>&2 2>&3)
|
||||||
exitstatus=$?
|
exitstatus=$?
|
||||||
if [ $exitstatus = 0 ]; then
|
if [ $exitstatus = 0 ]; then
|
||||||
echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
|
echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
|
||||||
else
|
else
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3)
|
BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3)
|
||||||
exitstatus=$?
|
exitstatus=$?
|
||||||
if [ $exitstatus = 0 ]; then
|
if [ $exitstatus = 0 ]; then
|
||||||
echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
|
echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
|
||||||
else
|
else
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" 3>&1 1>&2 2>&3)
|
MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" 3>&1 1>&2 2>&3)
|
||||||
exitstatus=$?
|
exitstatus=$?
|
||||||
if [ $exitstatus = 0 ]; then
|
if [ $exitstatus = 0 ]; then
|
||||||
MAC="$MAC1"
|
MAC="$MAC1"
|
||||||
|
@ -151,7 +151,7 @@ function advanced_settings() {
|
||||||
else
|
else
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3)
|
VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3)
|
||||||
exitstatus=$?
|
exitstatus=$?
|
||||||
if [ $exitstatus = 0 ]; then
|
if [ $exitstatus = 0 ]; then
|
||||||
if [ -z $VLAN1 ]; then
|
if [ -z $VLAN1 ]; then
|
||||||
|
@ -162,7 +162,7 @@ function advanced_settings() {
|
||||||
echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
|
echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
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)
|
MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||||
exitstatus=$?
|
exitstatus=$?
|
||||||
if [ $exitstatus = 0 ]; then
|
if [ $exitstatus = 0 ]; then
|
||||||
if [ -z $MTU1 ]; then
|
if [ -z $MTU1 ]; then
|
||||||
|
@ -173,14 +173,14 @@ function advanced_settings() {
|
||||||
echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}"
|
echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start Mikrotik RouterOS VM when completed?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start Mikrotik RouterOS VM when completed?" 10 58); then
|
||||||
echo -e "${DGN}Start Mikrotik RouterOS VM when completed: ${BGN}yes${CL}"
|
echo -e "${DGN}Start Mikrotik RouterOS VM when completed: ${BGN}yes${CL}"
|
||||||
START_VM="yes"
|
START_VM="yes"
|
||||||
else
|
else
|
||||||
echo -e "${DGN}Start Mikrotik RouterOS VM when completed: ${BGN}no${CL}"
|
echo -e "${DGN}Start Mikrotik RouterOS VM when completed: ${BGN}no${CL}"
|
||||||
START_VM="no"
|
START_VM="no"
|
||||||
fi
|
fi
|
||||||
if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create Mikrotik RouterOS VM?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create Mikrotik RouterOS VM?" 10 58); then
|
||||||
echo -e "${RD}Creating Mikrotik RouterOS VM using the above advanced settings${CL}"
|
echo -e "${RD}Creating Mikrotik RouterOS VM using the above advanced settings${CL}"
|
||||||
else
|
else
|
||||||
clear
|
clear
|
||||||
|
@ -190,7 +190,7 @@ function advanced_settings() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
function start_script() {
|
function start_script() {
|
||||||
if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" 10 58); then
|
||||||
clear
|
clear
|
||||||
header_info
|
header_info
|
||||||
echo -e "${BL}Using Default Settings${CL}"
|
echo -e "${BL}Using Default Settings${CL}"
|
||||||
|
@ -224,7 +224,7 @@ elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then
|
||||||
STORAGE=${STORAGE_MENU[0]}
|
STORAGE=${STORAGE_MENU[0]}
|
||||||
else
|
else
|
||||||
while [ -z "${STORAGE:+x}" ]; do
|
while [ -z "${STORAGE:+x}" ]; do
|
||||||
STORAGE=$(whiptail --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for the Mikrotik RouterOS VM?\n\n" \
|
"Which storage pool you would like to use for the Mikrotik RouterOS VM?\n\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
|
|
|
@ -135,7 +135,7 @@ function send_line_to_vm() {
|
||||||
TEMP_DIR=$(mktemp -d)
|
TEMP_DIR=$(mktemp -d)
|
||||||
pushd $TEMP_DIR >/dev/null
|
pushd $TEMP_DIR >/dev/null
|
||||||
|
|
||||||
if (whiptail --title "OpenWrt VM" --yesno "This will create a New OpenWrt VM. Proceed?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "OpenWrt VM" --yesno "This will create a New OpenWrt VM. Proceed?" 10 58); then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
header_info && echo -e "⚠ User exited script \n" && exit
|
header_info && echo -e "⚠ User exited script \n" && exit
|
||||||
|
@ -178,7 +178,7 @@ function arch_check() {
|
||||||
function ssh_check() {
|
function ssh_check() {
|
||||||
if command -v pveversion >/dev/null 2>&1; then
|
if command -v pveversion >/dev/null 2>&1; then
|
||||||
if [ -n "${SSH_CLIENT:+x}" ]; then
|
if [ -n "${SSH_CLIENT:+x}" ]; then
|
||||||
if whiptail --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then
|
if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then
|
||||||
echo "you've been warned"
|
echo "you've been warned"
|
||||||
else
|
else
|
||||||
clear
|
clear
|
||||||
|
@ -228,7 +228,7 @@ function default_settings() {
|
||||||
|
|
||||||
function advanced_settings() {
|
function advanced_settings() {
|
||||||
while true; do
|
while true; do
|
||||||
if VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z "$VMID" ]; then
|
if [ -z "$VMID" ]; then
|
||||||
VMID="$NEXTID"
|
VMID="$NEXTID"
|
||||||
fi
|
fi
|
||||||
|
@ -244,7 +244,7 @@ function advanced_settings() {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 openwrt --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 openwrt --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $VM_NAME ]; then
|
if [ -z $VM_NAME ]; then
|
||||||
HN="openwrt"
|
HN="openwrt"
|
||||||
else
|
else
|
||||||
|
@ -255,7 +255,7 @@ function advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 1 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 1 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $CORE_COUNT ]; then
|
if [ -z $CORE_COUNT ]; then
|
||||||
CORE_COUNT="1"
|
CORE_COUNT="1"
|
||||||
fi
|
fi
|
||||||
|
@ -264,7 +264,7 @@ function advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 256 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 256 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $RAM_SIZE ]; then
|
if [ -z $RAM_SIZE ]; then
|
||||||
RAM_SIZE="256"
|
RAM_SIZE="256"
|
||||||
fi
|
fi
|
||||||
|
@ -273,7 +273,7 @@ function advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if BRG=$(whiptail --inputbox "Set a WAN Bridge" 8 58 vmbr0 --title "WAN BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a WAN Bridge" 8 58 vmbr0 --title "WAN BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $BRG ]; then
|
if [ -z $BRG ]; then
|
||||||
BRG="vmbr0"
|
BRG="vmbr0"
|
||||||
fi
|
fi
|
||||||
|
@ -282,7 +282,7 @@ function advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if LAN_BRG=$(whiptail --inputbox "Set a LAN Bridge" 8 58 vmbr0 --title "LAN BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if LAN_BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a LAN Bridge" 8 58 vmbr0 --title "LAN BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $LAN_BRG ]; then
|
if [ -z $LAN_BRG ]; then
|
||||||
LAN_BRG="vmbr0"
|
LAN_BRG="vmbr0"
|
||||||
fi
|
fi
|
||||||
|
@ -291,7 +291,7 @@ function advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if LAN_IP_ADDR=$(whiptail --inputbox "Set a router IP" 8 58 $LAN_IP_ADDR --title "LAN IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if LAN_IP_ADDR=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a router IP" 8 58 $LAN_IP_ADDR --title "LAN IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $LAN_IP_ADDR ]; then
|
if [ -z $LAN_IP_ADDR ]; then
|
||||||
LAN_IP_ADDR="192.168.1.1"
|
LAN_IP_ADDR="192.168.1.1"
|
||||||
fi
|
fi
|
||||||
|
@ -300,7 +300,7 @@ function advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if LAN_NETMASK=$(whiptail --inputbox "Set a router netmmask" 8 58 $LAN_NETMASK --title "LAN NETMASK" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if LAN_NETMASK=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a router netmmask" 8 58 $LAN_NETMASK --title "LAN NETMASK" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $LAN_NETMASK ]; then
|
if [ -z $LAN_NETMASK ]; then
|
||||||
LAN_NETMASK="255.255.255.0"
|
LAN_NETMASK="255.255.255.0"
|
||||||
fi
|
fi
|
||||||
|
@ -309,7 +309,7 @@ function advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if MAC1=$(whiptail --inputbox "Set a WAN MAC Address" 8 58 $GEN_MAC --title "WAN MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a WAN MAC Address" 8 58 $GEN_MAC --title "WAN MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $MAC1 ]; then
|
if [ -z $MAC1 ]; then
|
||||||
MAC="$GEN_MAC"
|
MAC="$GEN_MAC"
|
||||||
else
|
else
|
||||||
|
@ -320,7 +320,7 @@ function advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if MAC2=$(whiptail --inputbox "Set a LAN MAC Address" 8 58 $GEN_MAC_LAN --title "LAN MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if MAC2=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a LAN MAC Address" 8 58 $GEN_MAC_LAN --title "LAN MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $MAC2 ]; then
|
if [ -z $MAC2 ]; then
|
||||||
LAN_MAC="$GEN_MAC_LAN"
|
LAN_MAC="$GEN_MAC_LAN"
|
||||||
else
|
else
|
||||||
|
@ -331,7 +331,7 @@ function advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if VLAN1=$(whiptail --inputbox "Set a WAN Vlan (leave blank for default)" 8 58 --title "WAN VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a WAN Vlan (leave blank for default)" 8 58 --title "WAN VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $VLAN1 ]; then
|
if [ -z $VLAN1 ]; then
|
||||||
VLAN1="Default"
|
VLAN1="Default"
|
||||||
VLAN=""
|
VLAN=""
|
||||||
|
@ -343,7 +343,7 @@ function advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if VLAN2=$(whiptail --inputbox "Set a LAN Vlan" 8 58 999 --title "LAN VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if VLAN2=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a LAN Vlan" 8 58 999 --title "LAN VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $VLAN2 ]; then
|
if [ -z $VLAN2 ]; then
|
||||||
VLAN2="999"
|
VLAN2="999"
|
||||||
LAN_VLAN=",tag=$VLAN2"
|
LAN_VLAN=",tag=$VLAN2"
|
||||||
|
@ -355,7 +355,7 @@ function advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
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 --backtitle "Proxmox VE Helper Scripts" --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 [ -z $MTU1 ]; then
|
if [ -z $MTU1 ]; then
|
||||||
MTU1="Default"
|
MTU1="Default"
|
||||||
MTU=""
|
MTU=""
|
||||||
|
@ -367,14 +367,14 @@ function advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
||||||
START_VM="yes"
|
START_VM="yes"
|
||||||
else
|
else
|
||||||
START_VM="no"
|
START_VM="no"
|
||||||
fi
|
fi
|
||||||
echo -e "${DGN}Start VM when completed: ${BGN}$START_VM${CL}"
|
echo -e "${DGN}Start VM when completed: ${BGN}$START_VM${CL}"
|
||||||
|
|
||||||
if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create OpenWrt VM?" --no-button Do-Over 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create OpenWrt VM?" --no-button Do-Over 10 58); then
|
||||||
echo -e "${RD}Creating a OpenWrt VM using the above advanced settings${CL}"
|
echo -e "${RD}Creating a OpenWrt VM using the above advanced settings${CL}"
|
||||||
else
|
else
|
||||||
header_info
|
header_info
|
||||||
|
@ -384,7 +384,7 @@ function advanced_settings() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function start_script() {
|
function start_script() {
|
||||||
if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
|
||||||
header_info
|
header_info
|
||||||
echo -e "${BL}Using Default Settings${CL}"
|
echo -e "${BL}Using Default Settings${CL}"
|
||||||
default_settings
|
default_settings
|
||||||
|
@ -421,7 +421,7 @@ elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then
|
||||||
STORAGE=${STORAGE_MENU[0]}
|
STORAGE=${STORAGE_MENU[0]}
|
||||||
else
|
else
|
||||||
while [ -z "${STORAGE:+x}" ]; do
|
while [ -z "${STORAGE:+x}" ]; do
|
||||||
STORAGE=$(whiptail --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for the OpenWrt VM?\n\n" \
|
"Which storage pool you would like to use for the OpenWrt VM?\n\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
|
|
|
@ -71,7 +71,7 @@ function cleanup() {
|
||||||
}
|
}
|
||||||
TEMP_DIR=$(mktemp -d)
|
TEMP_DIR=$(mktemp -d)
|
||||||
pushd $TEMP_DIR >/dev/null
|
pushd $TEMP_DIR >/dev/null
|
||||||
if (whiptail --title "PiMox HAOS VM" --yesno "This will create a New PiMox HAOS VM. Proceed?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "PiMox HAOS VM" --yesno "This will create a New PiMox HAOS VM. Proceed?" 10 58); then
|
||||||
echo "User selected Yes"
|
echo "User selected Yes"
|
||||||
else
|
else
|
||||||
clear
|
clear
|
||||||
|
@ -133,14 +133,14 @@ function default_settings() {
|
||||||
echo -e "${BL}Creating a HAOS VM using the above default settings${CL}"
|
echo -e "${BL}Creating a HAOS VM using the above default settings${CL}"
|
||||||
}
|
}
|
||||||
function advanced_settings() {
|
function advanced_settings() {
|
||||||
BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \
|
BRANCH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \
|
||||||
"$STABLE" "Stable" ON \
|
"$STABLE" "Stable" ON \
|
||||||
"$BETA" "Beta" OFF \
|
"$BETA" "Beta" OFF \
|
||||||
"$DEV" "Dev" OFF \
|
"$DEV" "Dev" OFF \
|
||||||
3>&1 1>&2 2>&3)
|
3>&1 1>&2 2>&3)
|
||||||
exitstatus=$?
|
exitstatus=$?
|
||||||
if [ $exitstatus = 0 ]; then echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}"; fi
|
if [ $exitstatus = 0 ]; then echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}"; fi
|
||||||
VMID=$(whiptail --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||||
exitstatus=$?
|
exitstatus=$?
|
||||||
if [ -z $VMID ]; then
|
if [ -z $VMID ]; then
|
||||||
VMID="$NEXTID"
|
VMID="$NEXTID"
|
||||||
|
@ -155,7 +155,7 @@ function advanced_settings() {
|
||||||
if [ $exitstatus = 0 ]; then echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"; fi
|
if [ $exitstatus = 0 ]; then echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"; fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
VM_NAME=$(whiptail --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 haos${BRANCH} --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||||
exitstatus=$?
|
exitstatus=$?
|
||||||
if [ -z $VM_NAME ]; then
|
if [ -z $VM_NAME ]; then
|
||||||
HN="haos${BRANCH}"
|
HN="haos${BRANCH}"
|
||||||
|
@ -166,7 +166,7 @@ function advanced_settings() {
|
||||||
echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
|
echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||||
exitstatus=$?
|
exitstatus=$?
|
||||||
if [ -z $CORE_COUNT ]; then
|
if [ -z $CORE_COUNT ]; then
|
||||||
CORE_COUNT="2"
|
CORE_COUNT="2"
|
||||||
|
@ -174,7 +174,7 @@ function advanced_settings() {
|
||||||
else
|
else
|
||||||
if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
|
if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
|
||||||
fi
|
fi
|
||||||
RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||||
exitstatus=$?
|
exitstatus=$?
|
||||||
if [ -z $RAM_SIZE ]; then
|
if [ -z $RAM_SIZE ]; then
|
||||||
RAM_SIZE="4096"
|
RAM_SIZE="4096"
|
||||||
|
@ -182,7 +182,7 @@ function advanced_settings() {
|
||||||
else
|
else
|
||||||
if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
|
if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
|
||||||
fi
|
fi
|
||||||
BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||||
exitstatus=$?
|
exitstatus=$?
|
||||||
if [ -z $BRG ]; then
|
if [ -z $BRG ]; then
|
||||||
BRG="vmbr0"
|
BRG="vmbr0"
|
||||||
|
@ -190,7 +190,7 @@ function advanced_settings() {
|
||||||
else
|
else
|
||||||
if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
|
if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
|
||||||
fi
|
fi
|
||||||
MAC1=$(whiptail --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||||
exitstatus=$?
|
exitstatus=$?
|
||||||
if [ -z $MAC1 ]; then
|
if [ -z $MAC1 ]; then
|
||||||
MAC="$GEN_MAC"
|
MAC="$GEN_MAC"
|
||||||
|
@ -201,7 +201,7 @@ function advanced_settings() {
|
||||||
echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
|
echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||||
exitstatus=$?
|
exitstatus=$?
|
||||||
if [ $exitstatus = 0 ]; then
|
if [ $exitstatus = 0 ]; then
|
||||||
if [ -z $VLAN1 ]; then
|
if [ -z $VLAN1 ]; then
|
||||||
|
@ -212,7 +212,7 @@ function advanced_settings() {
|
||||||
echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
|
echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
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)
|
MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||||
exitstatus=$?
|
exitstatus=$?
|
||||||
if [ $exitstatus = 0 ]; then
|
if [ $exitstatus = 0 ]; then
|
||||||
if [ -z $MTU1 ]; then
|
if [ -z $MTU1 ]; then
|
||||||
|
@ -223,14 +223,14 @@ function advanced_settings() {
|
||||||
echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}"
|
echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if (whiptail --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
||||||
echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}"
|
echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}"
|
||||||
START_VM="yes"
|
START_VM="yes"
|
||||||
else
|
else
|
||||||
echo -e "${DGN}Start VM when completed: ${BGN}no${CL}"
|
echo -e "${DGN}Start VM when completed: ${BGN}no${CL}"
|
||||||
START_VM="no"
|
START_VM="no"
|
||||||
fi
|
fi
|
||||||
if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" --no-button Do-Over 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create HAOS ${BRANCH} VM?" --no-button Do-Over 10 58); then
|
||||||
echo -e "${RD}Creating a HAOS VM using the above advanced settings${CL}"
|
echo -e "${RD}Creating a HAOS VM using the above advanced settings${CL}"
|
||||||
else
|
else
|
||||||
clear
|
clear
|
||||||
|
@ -240,7 +240,7 @@ function advanced_settings() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
function START_SCRIPT() {
|
function START_SCRIPT() {
|
||||||
if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
|
||||||
clear
|
clear
|
||||||
header_info
|
header_info
|
||||||
echo -e "${BL}Using Default Settings${CL}"
|
echo -e "${BL}Using Default Settings${CL}"
|
||||||
|
@ -273,7 +273,7 @@ elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then
|
||||||
STORAGE=${STORAGE_MENU[0]}
|
STORAGE=${STORAGE_MENU[0]}
|
||||||
else
|
else
|
||||||
while [ -z "${STORAGE:+x}" ]; do
|
while [ -z "${STORAGE:+x}" ]; do
|
||||||
STORAGE=$(whiptail --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for the HAOS VM?\n\n" \
|
"Which storage pool you would like to use for the HAOS VM?\n\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||||
|
|
Loading…
Reference in New Issue