feat: add zone file generating bash function

This commit is contained in:
Vri 2025-05-02 21:10:40 +02:00
parent bc0ef84465
commit c629b3fdf4
Signed by: vrifox
SSH key fingerprint: SHA256:7OLOvW+jmULkXpdl5rUWgid7WJQhOIEgj+4WP/PtCpI

View file

@ -27,10 +27,22 @@
default = mkShell {
nativeBuildInputs = [pkgs.dnscontrol];
shellHook = ''
shellHook =
# Auth Token
''
echo "Bitte einen deSEC-Auth-Token eingeben:"
read -rs DESEC_AUTH_TOKEN
export DESEC_AUTH_TOKEN
''
# Zonen-Datei generieren
+ ''
generate-zone-file () {
if [[ "$1" != "" ]]; then
dnscontrol get-zone --format=zone --out $1.zone' desec - $1
else
echo "Bitte eine valide Domain eingeben"
fi
};
'';
};
});