summaryrefslogtreecommitdiff
path: root/index.fpl
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2011-08-13 13:02:33 +0000
committerPaul Buetow <paul@buetow.org>2011-08-13 13:02:33 +0000
commit835c6ee12cd78cbd8caec77d11e8b074c6e5845e (patch)
tree6556f80fbb7c659da46673dd59f455d335e22d10 /index.fpl
parent56ea44e4892cc378ae8ddaf1a1891ccdff14aaab (diff)
added host based configs
Diffstat (limited to 'index.fpl')
-rwxr-xr-xindex.fpl9
1 files changed, 7 insertions, 2 deletions
diff --git a/index.fpl b/index.fpl
index 7d6e52c..a7d41b4 100755
--- a/index.fpl
+++ b/index.fpl
@@ -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();
}
-