SOURCES: nagios-notify-statusfile.patch (NEW) - set NAGIOS_STATUSD...

arekm arekm at pld-linux.org
Tue Apr 8 11:38:49 CEST 2008


Author: arekm                        Date: Tue Apr  8 09:38:49 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- set NAGIOS_STATUSDATAFILE to known value if nagios doesn't pass us this file path

---- Files affected:
SOURCES:
   nagios-notify-statusfile.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/nagios-notify-statusfile.patch
diff -u /dev/null SOURCES/nagios-notify-statusfile.patch:1.1
--- /dev/null	Tue Apr  8 11:38:49 2008
+++ SOURCES/nagios-notify-statusfile.patch	Tue Apr  8 11:38:44 2008
@@ -0,0 +1,16 @@
+diff -urN nagios-notify-0.9.5.org/nagios-notify nagios-notify-0.9.5/nagios-notify
+--- nagios-notify-0.9.5.org/nagios-notify	2006-08-04 03:11:30.000000000 +0200
++++ nagios-notify-0.9.5/nagios-notify	2008-04-08 11:22:51.505512189 +0200
+@@ -28,8 +28,10 @@
+ 	}' | sed -f - $tmpl
+ }
+ 
+-if [ -z "$NAGIOS_STATUSDATAFILE" ]; then
+-	echo >&2 "$prog: This program must be ran from Nagios."
++NAGIOS_STATUSDATAFILE=${NAGIOS_STATUSDATAFILE:-/var/lib/nagios/status.dat}
++
++if [ -f "$NAGIOS_STATUSDATAFILE" ]; then
++	echo >&2 "$prog: Nagios status.dat file not found."
+ 	exit 1
+ fi
+ 
================================================================


More information about the pld-cvs-commit mailing list