mirror of
https://github.com/myvesta/vesta
synced 2025-08-20 21:34:12 -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
|
@ -11,11 +11,9 @@
|
|||
|
||||
# Argument definition
|
||||
user=$1
|
||||
domain=$(idn -t --quiet -u "$2" )
|
||||
domain_idn=$(idn -t --quiet -a "$domain")
|
||||
domain=$2
|
||||
template=$3
|
||||
restart="$4"
|
||||
|
||||
restart=$4
|
||||
|
||||
# Includes
|
||||
source $VESTA/func/main.sh
|
||||
|
@ -23,6 +21,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 #
|
||||
|
@ -143,13 +145,11 @@ fi
|
|||
|
||||
|
||||
# Restarting web
|
||||
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
|
||||
|
||||
$BIN/v-restart-web-backend
|
||||
check_result $? "Web backend restart failed" >/dev/null
|
||||
fi
|
||||
$BIN/v-restart-web-backend $restart
|
||||
check_result $? "Web backend restart failed" >/dev/null
|
||||
|
||||
# Logging
|
||||
log_history "changed backend template for $domain to $template"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue