summaryrefslogtreecommitdiff
path: root/index.fpl
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2018-12-14 17:42:36 +0200
committerPaul Buetow <paul@buetow.org>2018-12-14 17:42:36 +0200
commit6cc1fe15416a6e652b644278626e47658351e545 (patch)
tree4c8890bdd5feef0b806974224181860807e8fd1b /index.fpl
parent849560bc3c48f6c753932dd08d2191e36d477ce0 (diff)
parent3e65cce0ec33e290cf45b7cc9e661977bb225810 (diff)
Merge branch 'hosts' of https://github.com/snonux/xerl into hosts
Diffstat (limited to 'index.fpl')
-rwxr-xr-xindex.fpl30
1 files changed, 30 insertions, 0 deletions
diff --git a/index.fpl b/index.fpl
new file mode 100755
index 0000000..8ae6699
--- /dev/null
+++ b/index.fpl
@@ -0,0 +1,30 @@
+#!/usr/bin/perl
+
+# Xerl (c) 2005-2011, 2013-2015 by Paul Buetow
+#
+# E-Mail: xerl@dev.buetow.org WWW: https://xerl.buetow.org
+#
+# This is free software, you may use it and distribute it under the same
+# terms as Perl itself.
+
+use strict;
+use warnings;
+
+use v5.14.0;
+
+use Xerl;
+
+use FCGI;
+use Socket;
+use Sys::Hostname;
+
+my $host = hostname();
+my $config =
+ -e "xerldev.conf"
+ ? "xerldev.conf"
+ : ( -e "xerl-$host.conf" ? "xerl-$host.conf" : 'config.conf' );
+
+while ( FCGI::accept >= 0 ) {
+ my $xerl = Xerl->new( config => $config );
+ $xerl->run();
+}