The static per-app CFG_<APP>_HOST_NAME is gone. host_setup (the app's canonical FQDN, feeding the legacy single DOMAINSUBNAME_DATA used by app env vars, the app URL and trusted-domains) is now derived from the app's primary Traefik port's subdomain: first recommended port, else first Traefik port; @/root -> apex, set -> sub.domain, empty -> app-name. Removes HOST_NAME from all app configs, the config-form field mapping (Hostname), the dead headscale stub, and wireguard.sh (now uses host_setup). Completes the move to dynamic per-port subdomain routing. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: librelad <librelad@digitalangels.vip>
25 lines
674 B
Bash
Executable File
25 lines
674 B
Bash
Executable File
#!/bin/bash
|
|
|
|
setupHeadscaleVariables()
|
|
{
|
|
local app_name="$1"
|
|
|
|
if [[ "$app_name" == "" ]]; then
|
|
isError "Something went wrong...No app name provided..."
|
|
if [[ "$initial_command2" == "terminal" ]]; then
|
|
resetToMenu;
|
|
fi
|
|
fi
|
|
|
|
# Build variable names based on app_name
|
|
headscale_domain_var="CFG_${app_name^^}_DOMAIN"
|
|
headscale_setup_var="CFG_${app_name^^}_HEADSCALE"
|
|
|
|
# Access the variables using variable indirection
|
|
headscale_domain="${!headscale_domain_var}"
|
|
headscale_setup="${!headscale_setup_var}"
|
|
# (HOST_NAME read dropped in the per-port subdomain refactor — it was unused.)
|
|
|
|
# UNFINISHED
|
|
}
|