From ef11c375b9e0fdfb8553a80445ac078b328d78a4 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Mon, 16 Sep 2013 15:46:00 +0300 Subject: [PATCH] fixes nginx template switcher --- bin/v-change-web-domain-proxy-tpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/v-change-web-domain-proxy-tpl b/bin/v-change-web-domain-proxy-tpl index ae2d6e2d..90f09c47 100755 --- a/bin/v-change-web-domain-proxy-tpl +++ b/bin/v-change-web-domain-proxy-tpl @@ -49,6 +49,7 @@ is_proxy_template_valid # Parsing domain values get_domain_values 'web' tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl" +old_tpl=$PROXY conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf" ip=$(get_real_ip $IP) @@ -66,10 +67,11 @@ chmod 640 $conf # Checking SSL if [ "$SSL" = 'yes' ]; then - tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl" + tpl_file="$WEBTPL/$PROXY_SYSTEM/$old_tpl.stpl" conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf" del_web_config + tpl_file="$WEBTPL/$PROXY_SYSTEM/$template.stpl" add_web_config chown root:$user $conf chmod 640 $conf