--- trunk/run.pl 2006/08/01 16:47:40 608 +++ trunk/run.pl 2006/08/23 11:04:32 613 @@ -8,7 +8,7 @@ use WebPAC::Common 0.02; use WebPAC::Lookup 0.03; -use WebPAC::Input 0.07; +use WebPAC::Input 0.10; use WebPAC::Store 0.03; use WebPAC::Normalize 0.11; use WebPAC::Output::TT; @@ -117,6 +117,16 @@ my $only_links = 0; my $merge = 0; +my $log = _new WebPAC::Common()->_get_logger(); + +my $hostname = `hostname`; +chomp($hostname); +$hostname =~ s/\..+$//; +if (-e "conf/$hostname.yml") { + $config = "conf/$hostname.yml"; + $log->info("using host configuration file: $config"); +} + GetOptions( "limit=i" => \$limit, "offset=i" => \$offset, @@ -138,11 +148,10 @@ $config = LoadFile($config); -print "config = ",dump($config) if ($debug); +#print "config = ",dump($config) if ($debug); die "no databases in config file!\n" unless ($config->{databases}); -my $log = _new WebPAC::Common()->_get_logger(); $log->info( "-" x 79 );