in reply to Re: Can't create file
in thread Can't create file
Thanks !#!/usr/local/bin/perl use strict; use CGI ':standard'; use Cwd; my $ipaddr = param('ipaddr'); my $domain = param('domain'); my $serial = `/bin/date +"%Y%m%d"00`; print header(), start_html('Zone created Successfully'), "Zone created Successfully", end_html(); open FILE, "+>", "/var/named/$domain.db"; print FILE "@ 86400 IN SOA ns1.eth1.in. ilugbelgaum.g +mail.com. ( $serial ; serial, todays date+todays 86400 ; refresh, seconds 7200 ; retry, seconds 3600000 ; expire, seconds 86400 ) ; minimum, seconds $domain. 86400 IN NS ns1.eth1.in. $domain. 86400 IN NS ns2.eth1.in. $domain. IN A $ipaddr localhost.$domain. IN A 127.0.0.1 $domain. IN MX 0 $domain. mail IN CNAME $domain. www IN CNAME $domain. ftp IN CNAME $domain. "; close FILE;
|
|---|