Last active
February 19, 2018 10:22
-
-
Save alexalouit/cdd10c626603872b8bd0 to your computer and use it in GitHub Desktop.
DNS (bind) errors regular email report
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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