Skip to content

Instantly share code, notes, and snippets.

@MrSwed
Last active October 22, 2017 10:19
Show Gist options
  • Select an option

  • Save MrSwed/142ab44bc5a532a50fa7ac487ae2daf9 to your computer and use it in GitHub Desktop.

Select an option

Save MrSwed/142ab44bc5a532a50fa7ac487ae2daf9 to your computer and use it in GitHub Desktop.
Aibolit home/$USER check. Log and Email
u=$USER
if [ $1 ]
then
u=$1
shift
fi
log=/root/temp/$u.ai-$(date +"%Y%m%d%H%M%S").log.html
php ai-bolit/ai-bolit/ai-bolit.php -p /home/$u/ -r $log $@
echo "Report $log done. Sending report.."
echo "Report $log done." | mail -a $log -s "Ai-bolit Report $u" root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment