nicolargo/shinkenautoinstall — Issue #7: Enhance script (check_mem and mail commands)
Author: rycks
Created: 2012-02-24 08:55:38+00:00
State: open

Hello, nicolargo,

thanks a lot for this auto-install script, here is a little feature request/patch (at the end of the script):

#check if nrpe on localhost is available -> install or inform ?
if [ ! -f /usr/lib/nagios/plugins/check_mem.pl ]; then
wget https://raw.github.com/justintime/nagios-plugins/master/check_mem/check_mem.pl -O /usr/lib/nagios/plugins/check_mem.pl
chmod +x /usr/lib/nagios/plugins/check_mem.pl
fi

#check if mail is available
mail -s "test mail" shinken@localhost < $LOG_FILE
if [ "x${?}" != "x0" ]; then
echo "please install mail command ..."
fi

Éric