LibrePortal/scripts/headscale/headscale_edit_config.sh
librelad 875a60f90f LibrePortal v0.1.0 — initial release
A free, open, self-hosted app platform (GNU AGPLv3): one-click app deploys,
Traefik reverse proxy with automatic SSL, rootless Docker support, gluetun
VPN routing, and a web dashboard to manage it all.

Free & open forever to self-host; optional paid hosted services fund it.
See PROMISE.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Signed-off-by: librelad <librelad@digitalangels.vip>
2026-05-21 20:37:54 +01:00

28 lines
870 B
Bash
Executable File

#!/bin/bash
headscaleEditConfig()
{
local config_file="${containers_dir}headscale/config/config.yaml"
local previous_md5=$(md5sum "$config_file" | awk '{print $1}')
$CFG_TEXT_EDITOR "$config_file"
local current_md5=$(md5sum "$config_file" | awk '{print $1}')
if [ "$previous_md5" != "$current_md5" ]; then
while true; do
echo ""
isNotice "Changes have been made to the Headscale configuration."
echo ""
isQuestion "Would you like to restart Headscale? (y/n): "
echo ""
read -p "" restart_headscale
if [[ -n "$restart_headscale" ]]; then
break
fi
isNotice "Please provide a valid input."
done
if [[ "$restart_choice" == [yY] ]]; then
dockerComposeRestart "headscale";
fi
fi
}