mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 10:37:42 -07:00
DNS Cluster Serial fix
This commit is contained in:
parent
a379e01e5a
commit
264b851d1a
22 changed files with 79 additions and 40 deletions
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
# info: rebuild dns domain
|
||||
# options: USER DOMAIN [RESTART]
|
||||
# options: USER DOMAIN [RESTART] [UPDATE_SERIAL]
|
||||
#
|
||||
# The function rebuilds DNS configuration files.
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
|||
user=$1
|
||||
domain=$2
|
||||
restart=$3
|
||||
update_serial=$4
|
||||
|
||||
# Includes
|
||||
source $VESTA/func/main.sh
|
||||
|
@ -25,7 +26,7 @@ source $VESTA/conf/vesta.conf
|
|||
# Verifications #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
check_args '2' "$#" 'USER DOMAIN [RESTART]'
|
||||
check_args '2' "$#" 'USER DOMAIN [RESTART] [UPDATE_SERIAL]'
|
||||
validate_format 'user' 'domain'
|
||||
is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'
|
||||
is_object_valid 'user' 'USER' "$user"
|
||||
|
@ -59,10 +60,15 @@ if [ -e '/etc/bind/named.conf' ]; then
|
|||
dns_conf='/etc/bind/named.conf'
|
||||
fi
|
||||
|
||||
# Remove old user's zone
|
||||
# Deleting old user's zone
|
||||
sed -i "/\/$user\/conf\/dns\/$domain/d" $dns_conf
|
||||
|
||||
# Starting loop
|
||||
# Updating zone serial
|
||||
if [ "$update_serial" != 'no' ]; then
|
||||
update_domain_serial
|
||||
fi
|
||||
|
||||
# Rebuiling zone config
|
||||
rebuild_dns_domain_conf
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue