mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 13:54:28 -07:00
replaced static definition for dns server
This commit is contained in:
parent
fbb54a87fe
commit
291870c182
6 changed files with 48 additions and 12 deletions
|
@ -48,8 +48,17 @@ for nameserver in ${ns//,/ };do
|
|||
i=$((i + 1))
|
||||
done
|
||||
|
||||
# Get dns config path
|
||||
if [ -e '/etc/named.conf' ]; then
|
||||
dns_conf='/etc/named.conf'
|
||||
fi
|
||||
|
||||
if [ -e '/etc/bind/named.conf' ]; then
|
||||
dns_conf='/etc/bin/named.conf'
|
||||
fi
|
||||
|
||||
# Remove old user's zone
|
||||
sed -i "/\/$user\/conf\/dns/d" /etc/named.conf
|
||||
sed -i "/\/$user\/conf\/dns/d" $dns_conf
|
||||
|
||||
# Starting loop
|
||||
for domain in $(search_objects 'dns' 'DOMAIN' "*" 'DOMAIN'); do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue