forked from TheWrightServer/ProxmoxVE
Update build.func
This commit is contained in:
parent
30bf69c5e5
commit
945d55f423
@ -91,7 +91,7 @@ spinner() {
|
|||||||
# This function displays an informational message with a yellow color.
|
# This function displays an informational message with a yellow color.
|
||||||
msg_info() {
|
msg_info() {
|
||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo -ne " ${TAB}${YW}${msg}"
|
echo -ne "${TAB}${YW}${msg}"
|
||||||
spinner &
|
spinner &
|
||||||
SPINNER_PID=$!
|
SPINNER_PID=$!
|
||||||
}
|
}
|
||||||
@ -203,8 +203,8 @@ base_settings() {
|
|||||||
SSH="no"
|
SSH="no"
|
||||||
TAGS="community-script;"
|
TAGS="community-script;"
|
||||||
|
|
||||||
# Changed From CT.sh
|
# Override default settings with variables from ct script
|
||||||
CT_TYPE=${var_unprivileged:-$CT_TYPE}
|
CT_TYPE=${var_privileged:-$CT_TYPE}
|
||||||
DISK_SIZE=${var_disk:-$DISK_SIZE}
|
DISK_SIZE=${var_disk:-$DISK_SIZE}
|
||||||
CORE_COUNT=${var_cpu:-$CORE_COUNT}
|
CORE_COUNT=${var_cpu:-$CORE_COUNT}
|
||||||
RAM_SIZE=${var_ram:-$RAM_SIZE}
|
RAM_SIZE=${var_ram:-$RAM_SIZE}
|
||||||
@ -223,9 +223,9 @@ base_settings() {
|
|||||||
# This function displays the default values for various settings.
|
# This function displays the default values for various settings.
|
||||||
echo_default() {
|
echo_default() {
|
||||||
# Convert CT_TYPE to description
|
# Convert CT_TYPE to description
|
||||||
CT_TYPE_DESC="Privileged"
|
CT_TYPE_DESC="Unprivileged"
|
||||||
if [ "$CT_TYPE" -eq 1 ]; then
|
if [ "$CT_TYPE" -eq 0 ]; then
|
||||||
CT_TYPE_DESC="Unprivileged"
|
CT_TYPE_DESC="Privileged"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Output the selected values with icons
|
# Output the selected values with icons
|
||||||
@ -236,7 +236,6 @@ echo_default() {
|
|||||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}"
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}"
|
||||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE}MB${CL}"
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE}MB${CL}"
|
||||||
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}${CT_ID}${CL}"
|
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}${CT_ID}${CL}"
|
||||||
# Include VERBOSE if enabled
|
|
||||||
if [ "$VERB" == "yes" ]; then
|
if [ "$VERB" == "yes" ]; then
|
||||||
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}Enabled${CL}"
|
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}Enabled${CL}"
|
||||||
fi
|
fi
|
||||||
@ -247,8 +246,7 @@ echo_default() {
|
|||||||
# This function is called when the user decides to exit the script. It clears the screen and displays an exit message.
|
# This function is called when the user decides to exit the script. It clears the screen and displays an exit message.
|
||||||
exit_script() {
|
exit_script() {
|
||||||
clear
|
clear
|
||||||
echo -e "\n"
|
echo -e "\n${CROSS}${RD}User exited script${CL}\n"
|
||||||
echo -e "${CROSS}${RD}User exited script${CL}\n"
|
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -293,10 +291,10 @@ advanced_settings() {
|
|||||||
while [ -z "$var_version" ]; do
|
while [ -z "$var_version" ]; do
|
||||||
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \
|
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \
|
||||||
"20.04" "Focal" OFF \
|
"20.04" "Focal" OFF \
|
||||||
"22.04" "Jammy" OFF \
|
"22.04" "Jammy" OFF \
|
||||||
"24.04" "Noble" OFF \
|
"24.04" "Noble" OFF \
|
||||||
"24.10" "Oracular" OFF \
|
"24.10" "Oracular" OFF \
|
||||||
3>&1 1>&2 2>&3); then
|
3>&1 1>&2 2>&3); then
|
||||||
if [ -n "$var_version" ]; then
|
if [ -n "$var_version" ]; then
|
||||||
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
|
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
|
||||||
fi
|
fi
|
||||||
@ -316,10 +314,10 @@ advanced_settings() {
|
|||||||
"0" "Privileged" OFF \
|
"0" "Privileged" OFF \
|
||||||
3>&1 1>&2 2>&3); then
|
3>&1 1>&2 2>&3); then
|
||||||
if [ -n "$CT_TYPE" ]; then
|
if [ -n "$CT_TYPE" ]; then
|
||||||
CT_TYPE_DESC="Privileged"
|
|
||||||
if [ "$CT_TYPE" -eq 1 ]; then
|
|
||||||
CT_TYPE_DESC="Unprivileged"
|
CT_TYPE_DESC="Unprivileged"
|
||||||
fi
|
if [ "$CT_TYPE" -eq 0 ]; then
|
||||||
|
CT_TYPE_DESC="Privileged"
|
||||||
|
fi
|
||||||
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}"
|
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@ -592,7 +590,7 @@ install_script() {
|
|||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --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 "${DEFAULT}${BOLD}${BL}Using Default Settings${CL}"
|
echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings${CL}"
|
||||||
base_settings
|
base_settings
|
||||||
echo_default
|
echo_default
|
||||||
else
|
else
|
||||||
header_info
|
header_info
|
||||||
|
Loading…
x
Reference in New Issue
Block a user