summaryrefslogtreecommitdiffstats
path: root/lib/exilog_config.pm
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2008-12-03 20:37:13 +0100
committerAndreas Unterkircher <unki@netshadow.at>2008-12-12 18:36:55 +0100
commit0a6e4fae2c79d5f9da1033e0a51abfc69e10b8b2 (patch)
tree041b13746bede1eeceec181a8a00405e26d9db36 /lib/exilog_config.pm
parent226ad0a3c764c0606048acf7371b02765eee60d2 (diff)
downloadexilog-0a6e4fae2c79d5f9da1033e0a51abfc69e10b8b2.zip
exilog-0a6e4fae2c79d5f9da1033e0a51abfc69e10b8b2.tar.gz
exilog-0a6e4fae2c79d5f9da1033e0a51abfc69e10b8b2.tar.bz2
sort files into their directories. move agent- and cleanup-script into 'agents', all static www-content (icons, stylesheet, javascript, ...) into 'htdocs'. cgi-stuff into 'cgi' and all reused code into 'lib'.
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
Diffstat (limited to 'lib/exilog_config.pm')
-rw-r--r--lib/exilog_config.pm63
1 files changed, 63 insertions, 0 deletions
diff --git a/lib/exilog_config.pm b/lib/exilog_config.pm
new file mode 100644
index 0000000..47d5483
--- /dev/null
+++ b/lib/exilog_config.pm
@@ -0,0 +1,63 @@
+#!/usr/bin/perl
+#
+# This file is part of the exilog suite.
+#
+# http://duncanthrax.net/exilog/
+#
+# (c) Tom Kistner 2004
+#
+# See LICENSE for licensing information.
+#
+
+package exilog_config;
+use strict;
+
+use FindBin;
+use FindBin qw($RealBin);
+use lib "$RealBin/";
+
+
+BEGIN {
+ use Exporter;
+ use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
+
+ # set the version for version checking
+ $VERSION = 0.1;
+ @ISA = qw(Exporter);
+ @EXPORT = qw(
+ $config
+ $version
+ );
+
+ %EXPORT_TAGS = ();
+
+ # your exported package globals go here,
+ # as well as any optionally exported functions
+ @EXPORT_OK = qw();
+
+ use vars qw( $config $version );
+}
+
+$version = "0.5";
+
+$config = _read_ph("$RealBin/exilog.conf");
+
+unless ($config) {
+ print STDERR "($$) [exilog_config] Can't parse configuration file.\n";
+ exit(0);
+};
+
+sub _read_ph {
+ my $file = shift;
+
+ open(PH,"< $file");
+ undef $/;
+ my $tmp = (eval(<PH>));
+ print STDERR "Eval Error: ".$@."\n" if ($@);
+ $/ = "\n";
+ close(PH);
+
+ return $tmp;
+};
+
+1;