Changeset 420 for trunk/cgi-bin
- Timestamp:
- 07/04/10 16:01:22 (14 years ago)
- Location:
- trunk/cgi-bin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r417 r420 59 59 # mostly for rwhois 60 60 ##fixme: leave these blank by default? 61 our $rwhoisDataPath = '/usr/local/rwhoisd/etc/rwhoisd'; # to match ./configure defaults from rwhoisd-1.5.9.6 61 62 our $org_street = '123 4th Street'; 62 63 our $org_city = 'Anytown'; … … 853 854 } 854 855 856 return if !@reciplist; 857 855 858 foreach my $recip (@reciplist) { 856 859 $mailer->mail("ipdb\@$domain"); -
trunk/cgi-bin/MyIPDB.pm
r417 r420 29 29 #$IPDB::defcustid = '5554242'; 30 30 # Globals for db2rwhois.pl 31 #$IPDB::rwhoisDataPath = '/usr/local/rwhoisd/etc/rwhoisd'; 31 32 #$IPDB::org_street = '123 4th Street'; 32 33 #$IPDB::org_city = 'Anytown'; -
trunk/cgi-bin/extras/db2rwhois.pl
r417 r420 26 26 #$ENV{"PATH"} = "/bin;/usr/bin"; 27 27 28 my $rwhoisDataPath = "/etc/rwhoisd";29 30 28 my @autharea; 31 29 my $authrw; 32 30 # Use the template file to allow us to keep persistent nodes aside from netblock data 33 open AUTHTEMPLATE, "<$ rwhoisDataPath/rwhoisd.auth_template";31 open AUTHTEMPLATE, "<$IPDB::rwhoisDataPath/rwhoisd.auth_template"; 34 32 my $template_persist; 35 33 while (<AUTHTEMPLATE>) { … … 48 46 49 47 # Get the list of live directories for potential deletion 50 opendir RWHOISROOT, $ rwhoisDataPath;48 opendir RWHOISROOT, $IPDB::rwhoisDataPath; 51 49 my %rwhoisdirs; 52 50 foreach (readdir RWHOISROOT) { … … 104 102 105 103 # Hokay. Gonna do checks *here* to see if we need to create new master trees 106 my $netdatadir = "$ rwhoisDataPath/$rwnet";104 my $netdatadir = "$IPDB::rwhoisDataPath/$rwnet"; 107 105 if (! -e $netdatadir) { 108 106 print " New master $masterblocks[$i]!\n"; … … 152 150 print " Copying template files...\n"; 153 151 ##fixme: find a way to do this without a shell (or functional equivalent) 154 qx { /bin/cp $ rwhoisDataPath/skel/attribute_defs/* $netdatadir/attribute_defs/ };152 qx { /bin/cp $IPDB::rwhoisDataPath/skel/attribute_defs/* $netdatadir/attribute_defs/ }; 155 153 156 154 ##fixme: not sure if this is even necessary, since it's not referenced anywhere I can recall... … … 188 186 my $masterfilename = "$rwnet/data/network/".$masterblocks[$i]->addr."-".$masterblocks[$i]->masklen.".txt"; 189 187 190 open MASTERFILE,">$ rwhoisDataPath/$masterfilename";188 open MASTERFILE,">$IPDB::rwhoisDataPath/$masterfilename"; 191 189 192 190 print MASTERFILE "ID: NETBLK-ISP.$masterblocks[$i]\n". … … 310 308 foreach my $netdir (keys %rwhoisdirs) { 311 309 print "deleting obsolete directory $netdir...\n"; 312 rmtree ( "$ rwhoisDataPath/$netdir", { verbose => 1, error => \my $errlist } );310 rmtree ( "$IPDB::rwhoisDataPath/$netdir", { verbose => 1, error => \my $errlist } ); 313 311 for my $diag (@$errlist) { 314 312 my ($file, $message) = each %$diag; … … 323 321 if ($authrw) { 324 322 print "Regenerating auth_area\n"; 325 open RWHOISDAUTH, ">$ rwhoisDataPath/rwhoisd.auth_area";323 open RWHOISDAUTH, ">$IPDB::rwhoisDataPath/rwhoisd.auth_area"; 326 324 print RWHOISDAUTH "# WARNING: This file is autogenerated! Any static nodes should\n". 327 325 "# be entered in /etc/rwhoisd/rwhoisd.auth_template\n"; … … 339 337 340 338 # restart/reload rwhoisd 341 if (-e "$ rwhoisDataPath/rwhoisd.pid") { # no pidfile, no restart.339 if (-e "$IPDB::rwhoisDataPath/rwhoisd.pid") { # no pidfile, no restart. 342 340 print "Restarting rwhoisd\n"; 343 open PIDFILE, "<$ rwhoisDataPath/rwhoisd.pid";341 open PIDFILE, "<$IPDB::rwhoisDataPath/rwhoisd.pid"; 344 342 my ($rwpid) = (<PIDFILE> =~ /^(\d+)/); 345 343 close PIDFILE; -
trunk/cgi-bin/main.cgi
r417 r420 961 961 if (!$status) { 962 962 printError("Customer ID not valid. Make sure the Customer ID ". 963 "is correct.<br>\nUse STAFF for staff static IPs, and $ defcustid for any other ".963 "is correct.<br>\nUse STAFF for staff static IPs, and $IPDB::defcustid for any other ". 964 964 "non-customer assignments."); 965 965 return;
Note:
See TracChangeset
for help on using the changeset viewer.