Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: librelad <librelad@digitalangels.vip>
24 lines
589 B
Bash
Executable File
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
|
|
}
|