mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-21 05:44:07 -07:00
new improved template scheme
This commit is contained in:
parent
14687f170a
commit
fd4e68bb8c
96 changed files with 1395 additions and 1425 deletions
|
@ -40,8 +40,8 @@ is_object_suspended 'web' 'DOMAIN' "$domain"
|
|||
|
||||
# Parsing domain values
|
||||
get_domain_values 'web'
|
||||
tpl_file="$WEBTPL/apache/$TPL.tpl"
|
||||
conf="$HOMEDIR/$user/conf/web/httpd.conf"
|
||||
tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.tpl"
|
||||
conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
|
||||
SUSPENDED='no'
|
||||
ip=$(get_real_ip $IP)
|
||||
|
||||
|
@ -52,27 +52,28 @@ upd_web_domain_values
|
|||
del_web_config
|
||||
add_web_config
|
||||
|
||||
# Check ssl
|
||||
# Check SSL
|
||||
if [ "$SSL" = 'yes' ]; then
|
||||
tpl_file="$WEBTPL/apache/$TPL.stpl"
|
||||
conf="$HOMEDIR/$user/conf/web/shttpd.conf"
|
||||
tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
|
||||
conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
|
||||
del_web_config
|
||||
add_web_config
|
||||
fi
|
||||
|
||||
# Checking nginx
|
||||
if [ ! -z "$NGINX" ]; then
|
||||
tpl_file="$WEBTPL/nginx/$NGINX.tpl"
|
||||
conf="$HOMEDIR/$user/conf/web/nginx.conf"
|
||||
# Checking proxy
|
||||
if [ ! -z "$PROXY" ]; then
|
||||
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
|
||||
conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
|
||||
del_web_config
|
||||
add_web_config
|
||||
fi
|
||||
|
||||
if [ "$SSL" = 'yes' ]; then
|
||||
tpl_file="$WEBTPL/nginx/$NGINX.stpl"
|
||||
conf="$HOMEDIR/$user/conf/web/snginx.conf"
|
||||
del_web_config
|
||||
add_web_config
|
||||
fi
|
||||
# Checking SSL proxy
|
||||
if [ ! -z "$PROXY" ] && [ "$SSL" = 'yes' ]; then
|
||||
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
|
||||
conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
|
||||
del_web_config
|
||||
add_web_config
|
||||
fi
|
||||
|
||||
|
||||
|
@ -86,7 +87,8 @@ decrease_user_value "$user" '$SUSPENDED_WEB'
|
|||
|
||||
# Restart web erver
|
||||
if [ "$restart" != 'no' ]; then
|
||||
$BIN/v-restart-web "$EVENT"
|
||||
$BIN/v-restart-web
|
||||
$BIN/v-restart-proxy
|
||||
fi
|
||||
|
||||
# Logging
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue