SVN: nagios-notify/trunk/nagios-notify
glen
glen at pld-linux.org
Tue Apr 8 13:10:16 CEST 2008
Author: glen
Date: Tue Apr 8 13:10:15 2008
New Revision: 9696
Modified:
nagios-notify/trunk/nagios-notify (contents, props changed)
Log:
- configure-like variable test check
- update requires
- expand Id keyword
Modified: nagios-notify/trunk/nagios-notify
==============================================================================
--- nagios-notify/trunk/nagios-notify (original)
+++ nagios-notify/trunk/nagios-notify Tue Apr 8 13:10:15 2008
@@ -1,8 +1,8 @@
#!/bin/sh
-# $Id: nagios-notify.sh,v 1.3 2006/08/03 12:39:22 glen Exp $
+# $Id$
#
# Template based Nagios notify script.
-# Requires: awk
+# Requires: awk, base64 (coreutils)
#
# Author: Elan Ruusamäe <glen at pld-linux.org>
# License: Same as Nagios (GPL v2)
@@ -50,14 +50,14 @@
}
-if [ "${NAGIOS_STATUSDATAFILE+X}" = X ]; then
+if [ "${NAGIOS_STATUSDATAFILE+set}" = set ]; then
NAGIOS_STATUSDATAFILE=${NAGIOS_STATUSDATAFILE:-/var/lib/nagios/status.dat}
else
echo >&2 "$prog: This program must be ran from Nagios."
exit 1
fi
-# extract nagios version from status file
+# extract Nagios version from status file
export NAGIOS_VERSION=$(awk -F= '/version=/{print $2}' $NAGIOS_STATUSDATAFILE)
tmpl="$templatedir/$1.tmpl"
More information about the pld-cvs-commit
mailing list