We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cad5397 commit 976e583Copy full SHA for 976e583
bin/v-restart-dns
@@ -43,7 +43,14 @@ if [ ! -z "$DNS_SYSTEM" ]; then
43
email=$(echo "$email" | cut -f 2 -d "'")
44
tmpfile=$(mktemp)
45
subj="$(hostname): $DNS_SYSTEM restart failed"
46
- /etc/init.d/$DNS_SYSTEM configtest >> $tmpfile 2>&1
+
47
+ # Get dns config path
48
+ if [ -e '/etc/named.conf' ]; then
49
+ dns_conf='/etc/named.conf'
50
+ else
51
+ dns_conf='/etc/bind/named.conf'
52
+ fi
53
+ named-checkconf $dns_conf >> $tmpfile 2>&1
54
/etc/init.d/$DNS_SYSTEM restart >> $tmpfile 2>&1
55
cat $tmpfile | $send_mail -s "$subj" $email
56
rm -f $tmpfile
0 commit comments