mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-20 13:24:24 -07:00
named-checkconf validation output
This commit is contained in:
parent
cad5397e6a
commit
976e58302e
1 changed files with 8 additions and 1 deletions
|
@ -43,7 +43,14 @@ if [ ! -z "$DNS_SYSTEM" ]; then
|
||||||
email=$(echo "$email" | cut -f 2 -d "'")
|
email=$(echo "$email" | cut -f 2 -d "'")
|
||||||
tmpfile=$(mktemp)
|
tmpfile=$(mktemp)
|
||||||
subj="$(hostname): $DNS_SYSTEM restart failed"
|
subj="$(hostname): $DNS_SYSTEM restart failed"
|
||||||
/etc/init.d/$DNS_SYSTEM configtest >> $tmpfile 2>&1
|
|
||||||
|
# Get dns config path
|
||||||
|
if [ -e '/etc/named.conf' ]; then
|
||||||
|
dns_conf='/etc/named.conf'
|
||||||
|
else
|
||||||
|
dns_conf='/etc/bind/named.conf'
|
||||||
|
fi
|
||||||
|
named-checkconf $dns_conf >> $tmpfile 2>&1
|
||||||
/etc/init.d/$DNS_SYSTEM restart >> $tmpfile 2>&1
|
/etc/init.d/$DNS_SYSTEM restart >> $tmpfile 2>&1
|
||||||
cat $tmpfile | $send_mail -s "$subj" $email
|
cat $tmpfile | $send_mail -s "$subj" $email
|
||||||
rm -f $tmpfile
|
rm -f $tmpfile
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue