diff options
| author | Paul Buetow <paul@buetow.org> | 2011-08-13 13:02:33 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2011-08-13 13:02:33 +0000 |
| commit | 835c6ee12cd78cbd8caec77d11e8b074c6e5845e (patch) | |
| tree | 6556f80fbb7c659da46673dd59f455d335e22d10 | |
| parent | 56ea44e4892cc378ae8ddaf1a1891ccdff14aaab (diff) | |
added host based configs
| -rwxr-xr-x | index.fpl | 9 | ||||
| -rwxr-xr-x | index.pl | 8 |
2 files changed, 14 insertions, 3 deletions
@@ -4,10 +4,15 @@ use strict; use warnings; use Xerl; + use FCGI; +use Socket; +use Sys::Hostname; + +my $host = hostname(); +my $config = -e "config-$host.txt" ? "config-$host.txt" : 'config.txt'; while (FCGI::accept >= 0) { - my Xerl $xerl = Xerl->new( config => 'config.txt' ); + my Xerl $xerl = Xerl->new( config => $config ); $xerl->run(); } - @@ -5,6 +5,12 @@ use warnings; use Xerl; -my Xerl $xerl = Xerl->new( config => 'config.txt' ); +use Socket; +use Sys::Hostname; + +my $host = hostname(); +my $config = -e "config-$host.txt" ? "config-$host.txt" : 'config.txt'; + +my Xerl $xerl = Xerl->new( config => $config ); $xerl->run(); |
