mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-21 22:04:00 -07:00
Merge pull request #1586 from moucho/suspend_dns
Adding and removing includes when suspending/unsuspending DNS zones
This commit is contained in:
commit
21278272ad
2 changed files with 24 additions and 0 deletions
|
@ -41,6 +41,16 @@ is_object_unsuspended 'dns' 'DOMAIN' "$domain"
|
||||||
# Action #
|
# Action #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
|
# Deleting system configs
|
||||||
|
if [[ "$DNS_SYSTEM" =~ named|bind ]]; then
|
||||||
|
if [ -e '/etc/named.conf' ]; then
|
||||||
|
dns_conf='/etc/named.conf'
|
||||||
|
else
|
||||||
|
dns_conf='/etc/bind/named.conf'
|
||||||
|
fi
|
||||||
|
|
||||||
|
sed -i "/\/$user\/conf\/dns\/$domain.db\"/d" $dns_conf
|
||||||
|
fi
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
# Vesta #
|
# Vesta #
|
||||||
|
|
|
@ -40,7 +40,21 @@ is_object_suspended 'dns' 'DOMAIN' "$domain"
|
||||||
# Action #
|
# Action #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
|
# Creating system configs
|
||||||
|
if [[ "$DNS_SYSTEM" =~ named|bind ]]; then
|
||||||
|
if [ -e '/etc/named.conf' ]; then
|
||||||
|
dns_conf='/etc/named.conf'
|
||||||
|
dns_group='named'
|
||||||
|
else
|
||||||
|
dns_conf='/etc/bind/named.conf'
|
||||||
|
dns_group='bind'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Adding zone in named.conf
|
||||||
|
named="zone \"$domain_idn\" {type master; file"
|
||||||
|
named="$named \"$HOMEDIR/$user/conf/dns/$domain.db\";};"
|
||||||
|
echo "$named" >> $dns_conf
|
||||||
|
fi
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
# Vesta #
|
# Vesta #
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue