mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 02:28:03 -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
|
@ -16,8 +16,7 @@
|
|||
|
||||
# Argument definition
|
||||
user=$1
|
||||
domain=$(idn -t --quiet -u "$2" )
|
||||
domain_idn=$(idn -t --quiet -a "$domain")
|
||||
domain=$2
|
||||
ssl_dir=$3
|
||||
ssl_home=${4-same}
|
||||
restart="$5"
|
||||
|
@ -28,6 +27,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 #
|
||||
|
@ -97,15 +100,11 @@ update_object_value 'web' 'DOMAIN' "$domain" '$SSL_HOME' "$SSL_HOME"
|
|||
update_object_value 'web' 'DOMAIN' "$domain" '$SSL' "yes"
|
||||
|
||||
# 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
|
||||
|
||||
if [ ! -z "$PROXY_SYSTEM" ]; then
|
||||
$BIN/v-restart-proxy
|
||||
check_result $? "Proxy restart failed" >/dev/null
|
||||
fi
|
||||
fi
|
||||
$BIN/v-restart-proxy $restart
|
||||
check_result $? "Proxy restart failed" >/dev/null
|
||||
|
||||
# Logging
|
||||
log_history "enabled ssl support for $domain"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue