[BACK]Return to update_nagios_wireless_client_config CVS log [TXT][DIR] Up to [local] / nagios / check_rrd / bin

File: [local] / nagios / check_rrd / bin / update_nagios_wireless_client_config (download)

Revision 1.2, Fri Jan 12 23:41:56 2007 UTC (17 years, 5 months ago) by andrew
Branch: MAIN
Changes since 1.1: +2 -2 lines

send mail to root.  It is handier there.

#!/bin/sh
# $RedRiver: update_nagios_wireless_client_config,v 1.1 2007/01/12 23:41:19 andrew Exp $

CFG=/etc/nagios/hosts-wireless-clients.cfg
NAGIOSOUT=`mktemp`

cp ${CFG} ${CFG}.old

make_wireless_client_config /var/www/wstationinfo/known_hosts.stor > ${CFG}

nagios -v /etc/nagios/nagios.cfg > ${NAGIOSOUT}

if [ $? -ne 0 ]; then
	mail -s "Nagios configuration problem!" root < ${NAGIOSOUT}
	cp ${CFG} ${CFG}.bad
	cp ${CFG}.old ${CFG}
fi
	

rm -f ${CFG}.old ${NAGIOSOUT}