Code refactoring: domain_idn + new restart routine

This commit is contained in:
Serghey Rodin 2017-01-11 16:52:11 +02:00
commit e5950d516d
104 changed files with 605 additions and 588 deletions

View file

@ -23,6 +23,10 @@ source $VESTA/func/domain.sh
source $VESTA/func/ip.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -48,10 +52,6 @@ fi
# Parsing domain values
get_domain_values 'web'
domain_idn="$domain"
if [[ "$domain" = *[![:ascii:]]* ]]; then
domain_idn=$(idn -t --quiet -a $domain)
fi
local_ip=$(get_real_ip $IP)
# Deleting domain from web.conf
@ -121,16 +121,12 @@ if [ ! -z "$ALIAS" ]; then
fi
# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
check_result $? "Web restart failed" >/dev/null
$BIN/v-restart-web $restart
check_result $? "Web restart failed" >/dev/null
# Restartinh proxy server
if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-restart-proxy
check_result $? "Proxy restart failed" >/dev/null
fi
fi
# Restartinh proxy server
$BIN/v-restart-proxy $restart
check_result $? "Proxy restart failed" >/dev/null
# Logging
log_history "deleted web domain $domain"