create_opendkim_key.sh: add output file containing TXT record as string for 'nsupdate'.

This commit is contained in:
Christoph 2019-01-01 03:29:00 +01:00
parent 97b927f1d8
commit 3bc92cbece

View File

@ -316,6 +316,22 @@ done < "${key_dir}/${time_stamp}.public"
echo " )" >> ${key_dir}/${time_stamp}.bind9
echo_ok
# - Write TXT record as string for 'nsupdate'
# -
echo " Write TXT record as string for 'nsupdate' to file"
echononl " '${key_dir}/${time_stamp}.nsupdate'"
echo -n "\"v=DKIM1; k=rsa; s=email; p=\"" >> ${key_dir}/${time_stamp}.nsupdate
while IFS='' read -r _line || [[ -n $_line ]] ; do
if echo "$_line" | grep -i -q -E "^---" 2> /dev/null ; then
continue
fi
echo -n " \"$_line\"" >> ${key_dir}/${time_stamp}.nsupdate
done < "${key_dir}/${time_stamp}.public"
echo_ok
info "Now you have to add the TXT Record to your zone file.\n\n\t Copy/Paste the following data:\n\n$(cat ${key_dir}/${time_stamp}.bind9)"
echo ""