[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-developers] DNS scripts



Hi Chun,

> I have hundreds of domains to park on a RaQ4 server. I would like to use PHP
> or PERL scripts to do the job, rather than using the web interface which is
> slow. Would anyone give me a clue where I can get the scripts? Thank you
> very much for your advice.

Just create a perl or shell script that appends lines to the /etc/named/records 
file. This way you can still use the GUI later.

Here is an example I often use to set up DNS:

#!/bin/sh
echo mx - $1 High mail.$1 >> records
echo mx www $1 High mail.$1 >> records
echo a mail $1 $2 24 >> records
echo a - $1 $2 24 >> records
echo a www $1 $2 24 >> records
echo a localhost $1 127.0.0.1 >> records
echo soa - $1 ns1.direct5.net:ns2.direct5.net:hostmaster@xxxxxxxxxxx:14400:3600:
604800:86400 - >> records

use it as:

./newdns <domainname> <ipaddress>

Don't forget to change the soa line  (use you own nameservers)

With regards,

Taco Scargo

Professional Services Manager, EMEA

Sun Microsystems		Tel. +31 (71) 565 7021
Sun Cobalt Server Appliances	taco.scargo@xxxxxxx