[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.3

1.1       andrew      1: #!/bin/sh
1.3     ! andrew      2: # $RedRiver: update_nagios_wireless_client_config,v 1.2 2007/01/12 23:41:56 andrew Exp $
1.1       andrew      3:
                      4: CFG=/etc/nagios/hosts-wireless-clients.cfg
                      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>