whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Configure Certificate Authority""Now that we defined the container we need to configure the certificate authority."858
ifCA_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Name of certificate authority"858"$DEFAULT_CA_NAME" --title "Configure Certificate Authority" 3>&1 1>&2 2>&3);then
if[ -z "$CA_NAME"];then
CA_NAME="$DEFAULT_CA_NAME"
fi
else
exit
fi
CA_DNS=()
DEFAULT_CA_DNS_ENTRY="${HN}.local"
ifCA_DNS_ENTRY=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "DNS entry of Certificate Authority"858"$DEFAULT_CA_DNS_ENTRY" --title "Configure Certificate Authority" 3>&1 1>&2 2>&3);then
if[ -z "$CA_DNS_ENTRY"];then
CA_DNS+=("$DEFAULT_CA_DNS_ENTRY")
else
CA_DNS+=("$CA_DNS_ENTRY")
fi
else
exit
fi
while whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "Configure Certificate Authority" --yesno "Do you want to add another DNS entry?"1072;do
ifCA_DNS_ENTRY=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "DNS entry of Certificate Authority"858"" --title "Configure Certificate Authority" 3>&1 1>&2 2>&3);then
if[ -n "$CA_DNS_ENTRY"];then
CA_DNS+=("$CA_DNS_ENTRY")
fi
fi
done
echo -e "${CONTAINERID}${BOLD}${DGN}Name of CA: ${BGN}$CA_NAME${CL}"