Script to delete zone from named.conf

bsd bsd at todoo.biz
Thu Feb 4 17:12:55 UTC 2010


Hello, 

I am looking for a script to delete a zone from named.conf and maybe also from server (zone file). 

My zone file looks like that (but could have some variations). Everything inside brackets should be deleted… and eventually the host file. 

zone "abc.com" {
       type slave; 
       masters  { 213.14.17.2 ; };
       file "hosts.abc.com";
};

zone "def.fr" {
       type slave; 
       masters  { 23.174.17.2 ; };
       file "hosts.def.fr";
};

zone "xyz.net" {
       type slave; 
       masters  { 23.74.27.2 ; };
       file "hosts.xyz.net";
};



I am not really a script guru and don't really know how to do that (sed ?). 

Thanks for your support. 



¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Gregober ---> PGP ID --> 0x1BA3C2FD
bsd @at@ todoo.biz
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

P "Please consider your environmental responsibility before printing this e-mail"





More information about the bind-users mailing list