Update build.func

This commit is contained in:
CanbiZ 2024-12-06 15:21:47 +01:00
parent 30bf69c5e5
commit 945d55f423

View File

@ -203,8 +203,8 @@ base_settings() {
SSH="no"
TAGS="community-script;"
# Changed From CT.sh
CT_TYPE=${var_unprivileged:-$CT_TYPE}
# Override default settings with variables from ct script
CT_TYPE=${var_privileged:-$CT_TYPE}
DISK_SIZE=${var_disk:-$DISK_SIZE}
CORE_COUNT=${var_cpu:-$CORE_COUNT}
RAM_SIZE=${var_ram:-$RAM_SIZE}
@ -223,9 +223,9 @@ base_settings() {
# This function displays the default values for various settings.
echo_default() {
# Convert CT_TYPE to description
CT_TYPE_DESC="Privileged"
if [ "$CT_TYPE" -eq 1 ]; then
CT_TYPE_DESC="Unprivileged"
if [ "$CT_TYPE" -eq 0 ]; then
CT_TYPE_DESC="Privileged"
fi
# 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 "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE}MB${CL}"
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}${CT_ID}${CL}"
# Include VERBOSE if enabled
if [ "$VERB" == "yes" ]; then
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}Enabled${CL}"
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.
exit_script() {
clear
echo -e "\n"
echo -e "${CROSS}${RD}User exited script${CL}\n"
echo -e "\n${CROSS}${RD}User exited script${CL}\n"
exit
}
@ -316,9 +314,9 @@ advanced_settings() {
"0" "Privileged" OFF \
3>&1 1>&2 2>&3); then
if [ -n "$CT_TYPE" ]; then
CT_TYPE_DESC="Privileged"
if [ "$CT_TYPE" -eq 1 ]; then
CT_TYPE_DESC="Unprivileged"
if [ "$CT_TYPE" -eq 0 ]; then
CT_TYPE_DESC="Privileged"
fi
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}"
fi