LibrePortal/scripts/network/variables/headscale_variables.sh
librelad d0b7b1a32f style: tidy comments — drop historical/removed-X notes
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
2026-05-22 11:26:42 +01:00

24 lines
589 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}"
# UNFINISHED
}