Skip to content

Instantly share code, notes, and snippets.

@alexalouit
Last active February 19, 2018 10:22
Show Gist options
  • Save alexalouit/cdd10c626603872b8bd0 to your computer and use it in GitHub Desktop.
Save alexalouit/cdd10c626603872b8bd0 to your computer and use it in GitHub Desktop.
DNS (bind) errors regular email report
#!/bin/bash
#
# cron ex: 0 * * * * /usr/bin/nice -n 19 /usr/bin/ionice -c2 -n7 /root/scripts/bind-errors.sh >> /root/scripts/cron.log
email=""
if [ -f /etc/bind/*.err ]
then
CONTAIN=$(ls -lah /etc/bind/*.err)
echo -e "Erreur du serveur Bind, zone:\n $CONTAIN" | mail -s "Rapport d'erreur Bind" $email
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment