summaryrefslogtreecommitdiff
path: root/index.pl
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.pl
parent56ea44e4892cc378ae8ddaf1a1891ccdff14aaab (diff)
added host based configs
Diffstat (limited to 'index.pl')
-rwxr-xr-xindex.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/index.pl b/index.pl
index 8afda26..d5a4ef3 100755
--- a/index.pl
+++ b/index.pl
@@ -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();