SVN: nagios-notify/trunk/nagios-notify

arekm arekm at pld-linux.org
Tue Apr 8 12:01:36 CEST 2008


Author: arekm
Date: Tue Apr  8 12:01:35 2008
New Revision: 9695

Modified:
   nagios-notify/trunk/nagios-notify
Log:
Use default /var/lib/nagios/status.dat when  NAGIOS_STATUSDATAFILE is set but empty. Raise error when variable is not set at all. (needed for some nagios3 where NAGIOS_STATUSDATAFILE is set but empty)

Modified: nagios-notify/trunk/nagios-notify
==============================================================================
--- nagios-notify/trunk/nagios-notify	(original)
+++ nagios-notify/trunk/nagios-notify	Tue Apr  8 12:01:35 2008
@@ -49,7 +49,10 @@
 	' $tmpl
 }
 
-if [ -z "$NAGIOS_STATUSDATAFILE" ]; then
+
+if [ "${NAGIOS_STATUSDATAFILE+X}" = X ]; then
+	NAGIOS_STATUSDATAFILE=${NAGIOS_STATUSDATAFILE:-/var/lib/nagios/status.dat}
+else
 	echo >&2 "$prog: This program must be ran from Nagios."
 	exit 1
 fi


More information about the pld-cvs-commit mailing list