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

Annotation of nagios/check_rrd/bin/update_nagios_wireless_client_config, Revision 1.4

1.1       andrew      1: #!/bin/sh
1.4     ! andrew      2: # $RedRiver: update_nagios_wireless_client_config,v 1.3 2007/01/13 00:04:51 andrew Exp $
1.1       andrew      3:
1.4     ! andrew      4: CFG=/etc/nagios/objects/hosts-wireless-clients.cfg
1.1       andrew      5: NAGIOSOUT=`mktemp`
                      6:
                      7: cp ${CFG} ${CFG}.old
                      8:
                      9: make_wireless_client_config /var/www/wstationinfo/known_hosts.stor > ${CFG}
                     10:
1.3       andrew     11: cmp -s ${CFG} ${CFG}.old
1.1       andrew     12:
                     13: if [ $? -ne 0 ]; then
1.3       andrew     14:
                     15:        nagios -v /etc/nagios/nagios.cfg > ${NAGIOSOUT}
                     16:
                     17:        if [ $? -ne 0 ]; then
                     18:                mail -s "Nagios configuration problem!" root < ${NAGIOSOUT}
                     19:                cp ${CFG} ${CFG}.bad
                     20:                cp ${CFG}.old ${CFG}
                     21:        else
                     22:                pkill -HUP nagios
                     23:        fi
1.1       andrew     24: fi
                     25:
                     26:
                     27: rm -f ${CFG}.old ${NAGIOSOUT}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>