Changeset 25 for trunk/dnsbl/orgmove
- Timestamp:
- 09/03/10 15:18:51 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dnsbl/orgmove
r2 r25 10 10 my $dnsbl = new DNSBL; 11 11 12 my $dbh = $dnsbl->connect; 12 # default DB info - all other settings should be loaded from the DB. 13 my $dbhost = "localhost"; 14 my $dbname = "dnsbl"; 15 my $dbuser = "dnsbl"; 16 my $dbpass = "spambgone"; 17 18 die "Usage: orgmove <config name> <old orgid> <new orgid>\n" if !$ARGV[2]; 19 my $cfgname = shift @ARGV; 20 21 # Load a config ref containing DB host, name, user, and pass info based on 22 # from the server name + full script web path. This allows us to host 23 # multiple instances without having to duplicate the code. 24 # This file is a Perl fragment to be processed inline. 25 if (-e "/etc/dnsbl/$cfgname.conf") { 26 my $cfg = `cat /etc/dnsbl/$cfgname.conf`; 27 ($cfg) = ($cfg =~ /^(.+)$/s); # avoid warnings, failures, and general nastiness with taint mode 28 eval $cfg; 29 } 30 31 my $dbh = $dnsbl->connect($dbhost, $dbname, $dbuser, $dbpass); 13 32 14 33 $dbh->{AutoCommit} = 0;
Note:
See TracChangeset
for help on using the changeset viewer.