summaryrefslogtreecommitdiffstats
path: root/bin/rndckey-gen.sh
blob: 2235dbaccf0894d48383888a453bdaa27d56a1b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/bash

# installer les paquets en dépendances :
# dnf install bind

DOMAINS="casperlefantom.net lelux.fi saulnier.im"
TSIG="hmac-sha512"

for i in $DOMAINS
do
    HASH=`rndc-confgen -A $TSIG -k $i | grep "secret" | head -1 | cut -d '"' -f2`
    echo "File to update: roles/dnsserver/vars/keys.yml"
    echo "Name: $i"
    echo "Secret: $HASH"
    echo "Algo: $TSIG"
done