mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 10:22:50 +00:00 
			
		
		
		
	Update build.func (#6608)
This commit is contained in:
		@@ -1030,10 +1030,9 @@ check_container_resources() {
 | 
				
			|||||||
  if [[ "$current_ram" -lt "$var_ram" ]] || [[ "$current_cpu" -lt "$var_cpu" ]]; then
 | 
					  if [[ "$current_ram" -lt "$var_ram" ]] || [[ "$current_cpu" -lt "$var_cpu" ]]; then
 | 
				
			||||||
    echo -e "\n${INFO}${HOLD} ${GN}Required: ${var_cpu} CPU, ${var_ram}MB RAM ${CL}| ${RD}Current: ${current_cpu} CPU, ${current_ram}MB RAM${CL}"
 | 
					    echo -e "\n${INFO}${HOLD} ${GN}Required: ${var_cpu} CPU, ${var_ram}MB RAM ${CL}| ${RD}Current: ${current_cpu} CPU, ${current_ram}MB RAM${CL}"
 | 
				
			||||||
    echo -e "${YWB}Please ensure that the ${APP} LXC is configured with at least ${var_cpu} vCPU and ${var_ram} MB RAM for the build process.${CL}\n"
 | 
					    echo -e "${YWB}Please ensure that the ${APP} LXC is configured with at least ${var_cpu} vCPU and ${var_ram} MB RAM for the build process.${CL}\n"
 | 
				
			||||||
    echo -ne "${INFO}${HOLD} May cause data loss! ${INFO} Continue update with under-provisioned LXC? <yes/No>  "
 | 
					    echo -ne "${INFO}${HOLD} May cause data loss! ${INFO} Continue update with under-provisioned LXC? [y/N] "
 | 
				
			||||||
    read -r prompt
 | 
					    read -r prompt
 | 
				
			||||||
    # Check if the input is 'yes', otherwise exit with status 1
 | 
					    if [[ ! "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
    if [[ ! ${prompt,,} =~ ^(yes)$ ]]; then
 | 
					 | 
				
			||||||
      echo -e "${CROSS}${HOLD} ${YWB}Exiting based on user input.${CL}"
 | 
					      echo -e "${CROSS}${HOLD} ${YWB}Exiting based on user input.${CL}"
 | 
				
			||||||
      exit 1
 | 
					      exit 1
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
@@ -1050,10 +1049,9 @@ check_container_storage() {
 | 
				
			|||||||
  if ((usage > 80)); then
 | 
					  if ((usage > 80)); then
 | 
				
			||||||
    # Prompt the user for confirmation to continue
 | 
					    # Prompt the user for confirmation to continue
 | 
				
			||||||
    echo -e "${INFO}${HOLD} ${YWB}Warning: Storage is dangerously low (${usage}%).${CL}"
 | 
					    echo -e "${INFO}${HOLD} ${YWB}Warning: Storage is dangerously low (${usage}%).${CL}"
 | 
				
			||||||
    echo -ne "Continue anyway? <y/N>  "
 | 
					    echo -ne "Continue anyway? [y/N] "
 | 
				
			||||||
    read -r prompt
 | 
					    read -r prompt
 | 
				
			||||||
    # Check if the input is 'y' or 'yes', otherwise exit with status 1
 | 
					    if [[ ! "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
    if [[ ! ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
					 | 
				
			||||||
      echo -e "${CROSS}${HOLD}${YWB}Exiting based on user input.${CL}"
 | 
					      echo -e "${CROSS}${HOLD}${YWB}Exiting based on user input.${CL}"
 | 
				
			||||||
      exit 1
 | 
					      exit 1
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user