Finally here is some last infos about the interworx tinydns install and how I did the setup of a new one
Interworx create a dnscache for 127.0.0.1
Interworx create a default /var/djbdns/tinydns with a default IP 1.2.3.4
tinydns-conf tinydns dnslog /var/djbdns/tinydns 1.2.3.4
they do not create a service for this one. So it means they do not create a symlink in /service/
They remove in /var/djbdns/tinydns all directories unless the root one
The data.cdb in /var/djbdns/tinydns is the exact copy of /home/interworx/var/lib/dns/data.cdb
They use this data.cdb as the main one. Every new server created on every IP you have will point on this data.cdb
So they create a dns serveur for every IP you have
tinydns-conf tinydns dnslog /var/djbdns/tinydns-xxx.xxx.xxx.xxx
where xxx is the IP
in all these new folders they create a symlink to /var/djbdns/tinydns/root
It means that there is only ONE data.cdb on for every IP.
Then they create the services by creating a symlink in /service/ for all these new server.
ln -s /var/djbdns/tinydns-xxx.xxx.xxx.xxx /service/tinydns-xxx.xxx.xxx.xxx
So here is what I fund after a lot of asks and a lot of research
Considering this here is how I have setup a new dns server on my box
1- I have deleted all symlink in /service/
I have no more /service/tinydns-xxx.xxx.xxx.xxx
2- I have stopped the service and deleted all /var/djbdns/tinydns-xxx.xxx.xxx.xxx
in every /var/djbdns/tinydns-xxx.xxx.xxx.xxx
svc -dx . log
then
rm -rf /var/djbdns/tinydns-xxx.xxx.xxx.xxx
[/quote]
3- I have keep the /var/djbdns/tinydns as it is in fact the one who hold the dns data
4- I have created my new tinydns server
tinydns-conf tinydns dnslog /etc/tinydns2-xxx.xxx.xxx.xx1 (where xxx is my regitered primary dns IP)
it means that I have an independant root/data and root/data.cdb in this folder
same for my secondary dns server
tinydns-conf tinydns dnslog /etc/tinydns2-xxx.xxx.xxx.xx2 (where xxx is my regitered primary dns IP)
but I have deleted the root folder in /etc/tinydns2-xxx.xxx.xxx.xx2 and created a symlink root that point to /etc/tinydns2-xxx.xxx.xxx.xx1
So I share with my primary server and my secodnary server the same data and data.cdb
then I have created the service by creating the a symlink in /service/
ln -s /etc/tinydns-xxx.xxx.xxx.xx1 /service/tinydns2-xxx.xxx.xxx.xx1
ln -s /etc/tinydns-xxx.xxx.xxx.xx2 /service/tinydns2-xxx.xxx.xxx.xx2
and started them
Well, now I think everything is fine.
In the gethosted script I have change the tinydns path to /etc/tinydns-xxx.xxx.xxx.xx1
The idea was to copy the entries in /home/interworx/var/lib/dns/data to /etc/tinydns-xxx.xxx.xxx.xx1 after the script has gotten the data from others boxes
So it means that in /etc/tinydns-xxx.xxx.xxx.xx1/root/data I’ll have :
- All dns data get from the dns-export.php file from all others boxes
- Then the dns data of my current interworx box
To do this I’ve only added these lines
// Pascal MAJ ================================
exec(“echo ‘####### start padawan.carat-hosting.com data #######’ >> $TINYDNS_DIR/root/data”);
exec(“cat /home/interworx/var/lib/dns/data.save >> $TINYDNS_DIR/root/data”);
exec(“cp $TINYDNS_DIR/root/data.cdb $TINYDNS_DIR/root/data.cdb.save”);
// Fin Pascal ==================================
In conclusion, I now understand how interworx has installed and run the tinydns server.
Thanks to Gethosted for this great script and thanks to interworx team for having provide me some useful informations
Hope it may help some of you
Pascal