echo"(In case of flase-positive, remember to update AIDE database (aide --update) to set a new baseline)">>$TMP.mailReport
echo" ">>$TMP.mailReport
if[$AIDE_UPDATE-eq 1 ];then
echo"Running aide --update to refresh the baseline. Warning : you may miss important alerts, you should not use this setting in production">>$TMP.mailReport
nice aide --update 1>>$TMP.mailReport 2>&1
fi
# send the alert if needed
if["x$MAIL\x"!="x\x"];then
cat$TMP.mailReport | mutt -a$TMP-s"[aideCheck.sh] Alert for $MYHOST, suspicious changes detected"--$MAIL
fi
fi
rm-f$TMP$TMP.mailReport $TMP.aideFail
# This script return value may be used to chain scripts