mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-06 15:59:17 +00:00
Request additional attributes
This commit is contained in:
parent
4ea7e25eeb
commit
55447b00fb
@ -15,6 +15,10 @@ var_os="alpine"
|
||||
var_version="3.20"
|
||||
var_unprivileged="0"
|
||||
|
||||
# CA default values
|
||||
DEFAULT_CA_NAME="HomeLab"
|
||||
|
||||
|
||||
# App Output & Base Settings
|
||||
header_info "$APP"
|
||||
base_settings
|
||||
@ -48,7 +52,50 @@ function update_script() {
|
||||
done
|
||||
}
|
||||
|
||||
function caDetails() {
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Configure Certificate Authority" "Now that we defined the container we need to configure the certificate authority." 8 58
|
||||
|
||||
if CA_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Name of certificate authority" 8 58 "$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"
|
||||
if CA_DNS_ENTRY=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "DNS entry of Certificate Authority" 8 58 "$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?" 10 72 ; do
|
||||
|
||||
if CA_DNS_ENTRY=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "DNS entry of Certificate Authority" 8 58 "" --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}"
|
||||
echo -e "CA DNS entries:"
|
||||
for DNS_ENTRY in ${CA_DNS[*]}; do
|
||||
echo -e "- $DNS_ENTRY"
|
||||
done
|
||||
|
||||
export CA_NAME
|
||||
export CA_DNS
|
||||
}
|
||||
|
||||
start
|
||||
caDetails
|
||||
build_container
|
||||
description
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user