By popular demand, here is the perl script I used:
#!/usr/bin/perl print "reloading BIND...\n"; system "rndc reload"; print "copying db files to ns2...\n"; $a = `/bin/ping -c 1 ns2`; if ($a =~ /64 bytes/) { system "sudo -u named scp -B /var/named/var/named/db.zone1 /var/named/var/named/db.zone2 [EMAIL PROTECTED]:/var/named/var/named"; print "Reloading ns2 BIND."; system "reload rndc -s ns2 reload"; } else { print "ns2 is not available. It cannot be updated.\n"; } You may have to modify the string I look for in line 6 to determine a successful ping depending on your OS (this was on Red Hat). On ns2 we set up the reverse so we could go both ways. This was handy also because we only needed to update 1 master and then push the update to the other. I'm not going to get into the stuff we did to make this all work (putting the correct keys and permissions in the correct places, etc.) but the above will get you started.
_______________________________________________ bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users