10 lines
265 B
Bash
10 lines
265 B
Bash
#!/usr/bin/bash
|
|
NAME=$(dnssec-keygen -a HMAC-SHA512 -b 512 -n HOST $1 2>/dev/null)
|
|
ENC_NAME=$(echo $NAME|base64 -w 0)
|
|
KEY=$(cat $NAME.key |base64 -w 0)
|
|
PRIVATE=$(cat $NAME.private |base64 -w 0)
|
|
echo "tsig:
|
|
- name: $ENC_NAME
|
|
key: $KEY
|
|
private: $PRIVATE"
|