Ignore:
Timestamp:
09/11/25 17:57:24 (3 days ago)
Author:
Kris Deugau
Message:

/trunk/uribl

Move the %config blurb inside the module so it's not splattered across all
the scripts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/uribl/export-uridb

    r80 r86  
    2929use URIdb 2.0;
    3030
    31 my $uridb = new URIdb;
    32 
    3331die "Usage: export-uridb <list> [type]\n"
    3432        if !$ARGV[0];
     
    4240$uridb->connect;
    4341
    44 my %config;
    45 my $sth = $dbh->prepare("SELECT key,value FROM misc");
    46 $sth->execute;
    47 while (my ($key,$value) = $sth->fetchrow_array) {
    48   $config{$key} = $value;
    49 }
    50 
    51 print "\$SOA 900 ".($config{blzone} ? $config{blzone} : 'uri').".dnsbl systems.company.com 0 1200 600 600 900\n".
    52         "\$NS 3600 127.0.0.1\n".
    53         "\$TTL 900\n";
    54 
    5542$uridb->export($mode,*STDOUT);
Note: See TracChangeset for help on using the changeset viewer.