Return to update_nagios_wireless_client_config CVS log | Up to [local] / nagios / check_rrd / bin |
File: [local] / nagios / check_rrd / bin / update_nagios_wireless_client_config (download)
Revision 1.4, Tue Dec 23 20:03:40 2008 UTC (15 years, 8 months ago) by andrew
new nagios means the cfg file moved |
#!/bin/sh # $RedRiver: update_nagios_wireless_client_config,v 1.3 2007/01/13 00:04:51 andrew Exp $ CFG=/etc/nagios/objects/hosts-wireless-clients.cfg NAGIOSOUT=`mktemp` cp ${CFG} ${CFG}.old make_wireless_client_config /var/www/wstationinfo/known_hosts.stor > ${CFG} cmp -s ${CFG} ${CFG}.old if [ $? -ne 0 ]; then 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} else pkill -HUP nagios fi fi rm -f ${CFG}.old ${NAGIOSOUT}