improving template structure

This commit is contained in:
Serghey Rodin 2013-04-03 23:18:51 +03:00
parent fce5ddeddf
commit cd69b7bcdf
23 changed files with 135 additions and 88 deletions

View file

@ -49,7 +49,7 @@ is_nginx_template_valid
# Parsing domain values
get_domain_values 'web'
tpl_file="$WEBTPL/nginx_$NGINX.tpl"
tpl_file="$WEBTPL/nginx/$NGINX.tpl"
conf="$HOMEDIR/$user/conf/web/nginx.conf"
ip=$(get_real_ip $IP)
@ -58,7 +58,7 @@ del_web_config
# Checking ssl
if [ "$SSL" = 'yes' ]; then
tpl_file="$WEBTPL/nginx_$NGINX.stpl"
tpl_file="$WEBTPL/nginx/$NGINX.stpl"
conf="$HOMEDIR/$user/conf/web/snginx.conf"
del_web_config
fi
@ -66,7 +66,7 @@ fi
# Add new vhost
NGINX="$template"
NGINX_EXT="$extentions"
tpl_file="$WEBTPL/nginx_$NGINX.tpl"
tpl_file="$WEBTPL/nginx/$NGINX.tpl"
conf="$HOMEDIR/$user/conf/web/nginx.conf"
upd_web_domain_values
add_web_config
@ -75,7 +75,7 @@ chmod 640 $conf
# Checking ssl
if [ "$SSL" = 'yes' ]; then
tpl_file="$WEBTPL/nginx_$NGINX.stpl"
tpl_file="$WEBTPL/nginx/$NGINX.stpl"
conf="$HOMEDIR/$user/conf/web/snginx.conf"
add_web_config
chown root:nginx $conf