add dev hostname

This commit is contained in:
CanbiZ 2025-03-12 08:34:57 +01:00
parent 8f638d3828
commit 522fd2b0eb

View File

@ -330,7 +330,7 @@ base_settings() {
VERBOSE="${1:-no}" VERBOSE="${1:-no}"
PW="" PW=""
CT_ID=$NEXTID CT_ID=$NEXTID
HN=$NSAPP HN="dev_${NSAPP}"
BRG="vmbr0" BRG="vmbr0"
NET="dhcp" NET="dhcp"
IPv6="auto" IPv6="auto"
@ -602,11 +602,12 @@ advanced_settings() {
exit exit
fi fi
if CT_NAME=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then if CT_NAME=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 "dev_${NSAPP}" --title "HOSTNAME" 3>&1 1>&2 2>&3); then
if [ -z "$CT_NAME" ]; then if [ -z "$CT_NAME" ]; then
HN="$NSAPP" HN="dev_${NSAPP}"
else else
HN=$(echo ${CT_NAME,,} | tr -d ' ') HN=$(echo ${CT_NAME,,} | tr -d ' ')
[[ $HN != dev_* ]] && HN="dev_${HN}"
fi fi
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}" echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
else else