summaryrefslogtreecommitdiff
path: root/index.fcgi
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2018-12-14 16:42:24 +0200
committerPaul Buetow <paul@buetow.org>2018-12-14 16:42:24 +0200
commita99e4d337bee2ab064af909b43011951db310c9d (patch)
tree74f1431be09b8c85ddca14d4185adc5b7119e100 /index.fcgi
parent53a3a612a6f506578402099921bbd130d5791fe1 (diff)
fix perl path for centos 7
Diffstat (limited to 'index.fcgi')
-rwxr-xr-xindex.fcgi31
1 files changed, 31 insertions, 0 deletions
diff --git a/index.fcgi b/index.fcgi
new file mode 100755
index 0000000..d21ae1c
--- /dev/null
+++ b/index.fcgi
@@ -0,0 +1,31 @@
+#!/usr/bin/perl
+
+# Xerl (c) 2005-2011, 2013-2015 by Paul Buetow
+#
+# E-Mail: xerl@dev.buetow.org WWW: http://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 lib qw(.);
+
+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();
+}