where does my master send the notify message?
Michael Kjorling
michael at kjorling.com
Mon Nov 26 20:50:18 UTC 2001
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Perhaps not automate it, but the script included below might help you
a little. Just be sure to customize it for your system; also, it comes
with NO WARRANTIES WHATSOEVER. I take no responsibility for any damage
it may cause to your systems; use at your OWN risk.
Execute it as:
[/bin/bash] <filename> zonename master1 [ master2 ... ]
You can specify a basically unlimited number of master servers.
Michael Kjörling
On Nov 26 2001 21:40 +0100, Michael Boehme wrote:
> P.S.: Is there any way to automate the zone-file the slave holds? If I setup
> a new domain I will have to add it to the masters zone file and even to the
> slaves zone file to let it know that it should poll the zone from the
> master.
- --
Michael Kjörling -- Programmer/Network administrator ^..^
PGP: 95f1 074d 336d f8f0 f297 6a5b 2aa3 7bfd 8a70 e33e \/
Internet: michael at kjorling.com -- FidoNet: 2:204/254.4
"There is something to be said about not trying to be glamorous
and popular and cool. Just be real -- and life will be real."
(Joyce Sequichie Hifler, September 13 2001, www.hifler.com)
- --- addslave script begins here ---
#!/bin/sh
# Script copyright (c) 2001 Michael Kjörling <michael at kjorling.com>
namedconf=/var/named/slavezones.conf
rndc=/usr/sbin/rndc
fileprefix=zones/slaves/
filesuffix=.slave
[ -z "$1" ] && ( echo "Zone name must be specified!"; exit )
[ -z "$2" ] && ( echo "At least one master must be specified!"; exit )
zone="$1"
masters="$2;"
shift 2
while [ ! -z "$1" ]; do
masters="${masters} $1;"
shift
done
zc=`grep -ci "zone\s+\"${zone}\"\s*{" ${namedconf} 2>/dev/null`
[ ${zc} != 0 ] && ( echo "We already have a definition for the zone ${zone}!" ) || \
( echo "zone \"${zone}\" { type slave; masters { ${masters} }; file \"${fileprefix}${zone}${filesuffix}\"; }; # Added `date`" >> "${namedconf}" && \
${rndc} reload && \
echo Slave zone ${zone} added; masters clause containing ${masters} \
)
- --- addslave script ends here ---
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Public key is at http://michael.kjorling.com/contact/pgp.html
iD8DBQE8AqsPKqN7/Ypw4z4RAqbHAJ41XcgDCGEzo+geYTniIWpCPwPodgCfSlBC
qxlfkGH3hPHses4V4X+9FWQ=
=hS+i
-----END PGP SIGNATURE-----
More information about the bind-users
mailing list