File nagiosgraph-fhs.patch of Package nagiosgraph

Index: cgi/show.cgi
===================================================================
--- cgi/show.cgi.orig
+++ cgi/show.cgi
@@ -8,7 +8,7 @@
 # Author:  (c) 2010 Matthew Wall
 
 # The configuration file and ngshared.pm must be in this directory:
-use lib '/opt/nagiosgraph/etc';
+use lib '/etc/nagiosgraph';
 
 use ngshared;
 use English qw(-no_match_vars);
Index: cgi/showgraph.cgi
===================================================================
--- cgi/showgraph.cgi.orig
+++ cgi/showgraph.cgi
@@ -8,7 +8,7 @@
 # Author:  (c) 2010 Matthew Wall
 
 # The configuration file and ngshared.pm must be in this directory:
-use lib '/opt/nagiosgraph/etc';
+use lib '/etc/nagiosgraph';
 
 use ngshared;
 use RRDs;
Index: cgi/showhost.cgi
===================================================================
--- cgi/showhost.cgi.orig
+++ cgi/showhost.cgi
@@ -9,7 +9,7 @@
 # Author:  (c) 2010 Matthew Wall
 
 # The configuration file and ngshared.pm must be in this directory:
-use lib '/opt/nagiosgraph/etc';
+use lib '/etc/nagiosgraph';
 
 use ngshared;
 use English qw(-no_match_vars);
Index: cgi/showservice.cgi
===================================================================
--- cgi/showservice.cgi.orig
+++ cgi/showservice.cgi
@@ -9,7 +9,7 @@
 # Author:  (c) 2010 Matthew Wall
 
 # The configuration file and ngshared.pm must be in this directory:
-use lib '/opt/nagiosgraph/etc';
+use lib '/etc/nagiosgraph';
 
 use ngshared;
 use English qw(-no_match_vars);
Index: cgi/testcolor.cgi
===================================================================
--- cgi/testcolor.cgi.orig
+++ cgi/testcolor.cgi
@@ -10,7 +10,7 @@
 ## no critic (ProhibitConstantPragma)
 
 # The configuration file and ngshared.pm must be in this directory:
-use lib '/opt/nagiosgraph/etc';
+use lib '/etc/nagiosgraph';
 
 use ngshared;
 use English qw(-no_match_vars);
Index: etc/nagiosgraph.conf
===================================================================
--- etc/nagiosgraph.conf.orig
+++ etc/nagiosgraph.conf
@@ -8,22 +8,22 @@
 # Author:  (c) 2010 Matthew Wall
 
 # Location of output from nagiosgraph data processing
-logfile = /var/nagiosgraph/nagiosgraph.log
+logfile = /var/log/nagios/nagiosgraph.log
 
 # Location of output from nagiosgraph CGI scripts
-cgilogfile = /var/nagiosgraph/nagiosgraph-cgi.log
+cgilogfile = /var/log/nagios/nagiosgraph-cgi.log
 
 # Location of nagios performance data log file.
-perflog = /var/nagios/perfdata.log
+perflog = /var/log/nagios/service-perfdata
 
 # Directory in which to store RRD files
-rrddir = /var/nagiosgraph/rrd
+rrddir = /var/lib/nagios/rrd
 
 # File containing regular expressions to identify service and perf data
 mapfile = /etc/nagiosgraph/map
 
 # Nagiosgraph CGI URL.
-nagiosgraphcgiurl = /nagiosgraph/cgi-bin
+nagiosgraphcgiurl = /nagios/cgi-bin
 
 # Nagios CGI URL.  If the Nagiosgraph CGI scripts are in a directory other
 # than the Nagios CGI directory, then specify the Nagios CGI URL here.
Index: etc/ngshared.pm
===================================================================
--- etc/ngshared.pm.orig
+++ etc/ngshared.pm
@@ -769,7 +769,7 @@ sub readconfig {
     if (! $logid) { $logid = 'logfile'; }
 
     my $debug = 0; # set this higher to debug config file parsing
-    my $errstr = readfile($INC[0] . q(/) . $CFGNAME, \%Config, $debug);
+    my $errstr = readfile("/etc/$CFGNAME", \%Config, $debug);
     if ($errstr ne q()) { return $errstr; }
 
     initlog($app, $Config{$logid});
Index: lib/insert.pl
===================================================================
--- lib/insert.pl.orig
+++ lib/insert.pl
@@ -30,7 +30,7 @@
 
 
 # The configuration file and ngshared.pm must be in this directory:
-use lib '/opt/nagiosgraph/etc';
+use lib '/etc/nagiosgraph';
 
 use ngshared;
 use strict;
Index: lib/insert.sh
===================================================================
--- lib/insert.sh.orig
+++ lib/insert.sh
@@ -11,4 +11,4 @@
 #    command_line    /usr/local/lib/nagios/insert.sh "$LASTSERVICECHECK$||$HOSTNAME$||$SERVICEDESC$||$SERVICEOUTPUT$||$SERVICEPERFDATA$"
 #}
 
-/usr/bin/perl /usr/local/lib/nagios/insert.pl "$*"
+/usr/bin/perl /usr/lib/nagiosgraph/insert.pl "$*"
openSUSE Build Service is sponsored by