mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-22 01:59:26 +00:00
25 lines
413 B
Bash
25 lines
413 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
zone=secure.example.
|
||
|
infile=secure.example.db.in
|
||
|
zonefile=secure.example.db
|
||
|
|
||
|
rm -f K$zone*.key
|
||
|
rm -f K$zone*.private
|
||
|
rm -f $zone*.keyset
|
||
|
|
||
|
keyname=`$KEYGEN -a RSA -b 768 -n zone $zone`
|
||
|
|
||
|
tag=`echo $keykname | sed -n 's/^.*\+\([0-9][0-9]*\)$/\1/p'`
|
||
|
|
||
|
echo "key=$keyname, tag=$tag"
|
||
|
|
||
|
pubkeyfile="$keyname.key"
|
||
|
|
||
|
$KEYSETTOOL $zone $tag/001
|
||
|
|
||
|
cat $infile $pubkeyfile >$zonefile
|
||
|
|
||
|
$SIGNER -v 1 -o $zone $zonefile
|
||
|
|