mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-21 05:44:07 -07:00
Code refactoring: domain_idn + new restart routine
This commit is contained in:
parent
b98abaf572
commit
e5950d516d
104 changed files with 605 additions and 588 deletions
|
@ -12,8 +12,7 @@
|
|||
|
||||
# Argument definition
|
||||
user=$1
|
||||
domain=$(idn -t --quiet -u "$2" )
|
||||
domain_idn=$(idn -t --quiet -a "$domain")
|
||||
domain=$2
|
||||
soa=$(echo $3 | sed -e 's/\.*$//g' -e 's/^\.*//g')
|
||||
restart=$4
|
||||
|
||||
|
@ -22,6 +21,10 @@ source $VESTA/func/main.sh
|
|||
source $VESTA/func/domain.sh
|
||||
source $VESTA/conf/vesta.conf
|
||||
|
||||
# Additional argument formatting
|
||||
format_domain
|
||||
format_domain_idn
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Verifications #
|
||||
|
@ -65,10 +68,8 @@ fi
|
|||
#----------------------------------------------------------#
|
||||
|
||||
# Restarting named
|
||||
if [ "$restart" != 'no' ]; then
|
||||
$BIN/v-restart-dns
|
||||
check_result $? "DNS restart failed" >/dev/null
|
||||
fi
|
||||
$BIN/v-restart-dns $restart
|
||||
check_result $? "DNS restart failed" >/dev/null
|
||||
|
||||
# Logging
|
||||
log_history "changed soa record for $domain to $soa"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue