ispman/bin ispman.make_named_conf,NONE,1.1
Atif Ghaffar <[email protected]>
| Newsgroups | gmane.comp.isp.ispman.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ispman/ispman/bin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30393
Added Files:
ispman.make_named_conf
Log Message:
CLI for writting the zone file and making the named.ispman.conf
--- NEW FILE: ispman.make_named_conf ---
#!/usr/bin/perl
package ISPMan;
BEGIN {
use FindBin;
unshift @INC,
( $FindBin::Bin, "$FindBin::Bin/../lib", "$FindBin::Bin/../conf" );
unless (@ARGV){
print "Usage: $FindBin::Script domain\n";
exit;
}
}
use File::Path;
use Fcntl;
use POSIX qw(tmpnam setsid);
use ISPMan;
$ispman = ISPMan->new();
$namedConfFile = $ispman->getConf('namedConfFile');
$namedConfHeaderFile = $ispman->getConf('namedConfHeaderFile');
$namedConfFooterFile = $ispman->getConf('namedConfFooterFile');
$namedDir = join "/",
( $ispman->getConf('namedDir'), $ispman->getConf('namedIspmanSubDir') );
$namedRevDir = join "/", ( $namedDir, $ispman->getConf('namedRevDir') );
$namedPriDir = join "/", ( $namedDir, $ispman->getConf('namedPriDir') );
$namedSecDir = join "/", ( $namedDir, $ispman->getConf('namedSecDir') );
$namedDir =~ s!//!/!g;
$namedRevDir =~ s!//!/!g;
$namedPriDir =~ s!//!/!g;
$namedSecDir =~ s!//!/!g;
require "$FindBin::Bin/../lib/dns.lib";
my $filter = sprintf("&(objectclass=ispmanDomain)"); #(dnsHost=%s)" , $hostname);
&make_named_conf( $ARGV[0], $filter );
__END__
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt