[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.1, Fri Jan 12 23:41:19 2007 UTC (17 years, 5 months ago) by andrew
Branch: MAIN

add a wrapper script to update the config.

#!/bin/sh
# $RedRiver$

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!" andrew < ${NAGIOSOUT}
	cp ${CFG} ${CFG}.bad
	cp ${CFG}.old ${CFG}
fi
	

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