Description: Fix path/filename of dmarcts-report-parser script, dbx_<database>.pl include files and config file for Debian.
Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Forwarded: not-needed, Debian-specific

--- a/dmarcts-report-parser.pl
+++ b/dmarcts-report-parser.pl
@@ -85,11 +85,11 @@
 sub show_usage {
 	print "\n";
 	print " Usage: \n";
-	print "    ./dmarcts-report-parser.pl [OPTIONS] [PATH] \n";
+	print "    dmarcts-report-parser [OPTIONS] [PATH] \n";
 	print "\n";
 	print " This script needs a configuration file called <dmarcts-report-parser.conf> in \n";
-	print " the current working directory, which defines a database server with credentials \n";
-	print " and (if used) an IMAP server with credentials. \n";
+	print " the /etc directory, which defines a database server with credentials and (if used)\n";
+	print " an IMAP server with credentials. \n";
 	print "\n";
 	print " Additionaly, one of the following source options must be provided: \n";
 	print "        -i : Read reports from messages on IMAP server as defined in the \n";
@@ -128,7 +128,7 @@
 $db_tx_support	= 1;
 
 # used in messages
-my $scriptname = 'dmarcts-report-parser.pl';
+my $scriptname = 'dmarcts-report-parser';
 
 # allowed values for the DB columns, also used to build the enum() in the
 # CREATE TABLE statements in checkDatabase(), in order defined here
@@ -171,7 +171,7 @@
 
 # Load script configuration options from local config file. The file is expected
 # to be in the current working directory.
-my $conf_file = 'dmarcts-report-parser.conf';
+my $conf_file = '/etc/dmarcts-report-parser.conf';
 
 # Get command line options.
 my %options = ();
@@ -180,7 +180,7 @@
 
 # locate conf file or die
 if ( -e $conf_file ) {
-  #$conf_file = "./$conf_file";
+	$conf_file = "$conf_file";
 } elsif( -e  (File::Basename::dirname($0) . "/$conf_file" ) ) {
 	$conf_file = ( File::Basename::dirname($0) . "/$conf_file" );
 } else {
@@ -265,7 +265,7 @@
 
 # Setup connection to database server.
 our %dbx;
-my $dbx_file = File::Basename::dirname($0) . "/dbx_$dbtype.pl";
+my $dbx_file = "/usr/share/dmarcts-report-parser/dbx_$dbtype.pl";
 my $dbx_return = do $dbx_file;
 die "$scriptname: couldn't load DB definition for type $dbtype: $@" if $@;
 die "$scriptname: couldn't load DB definition for type $dbtype: $!" unless defined $dbx_return;
