From d2e01fab7613cef8698454f120d1475524334c26 Mon Sep 17 00:00:00 2001 From: phre4k Date: Tue, 9 Feb 2016 22:30:42 +0100 Subject: [PATCH] added check for web server type in SSL config, closes #626 --- bin/v-add-web-domain-ssl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/v-add-web-domain-ssl b/bin/v-add-web-domain-ssl index 72767e77..4ed70289 100755 --- a/bin/v-add-web-domain-ssl +++ b/bin/v-add-web-domain-ssl @@ -90,11 +90,15 @@ if [ -x $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.sh ]; then $user $domain $ip $HOMEDIR $sdocroot fi -# Checking web config +# Checking web config include web_conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf" -if [ -z "$(grep "$conf" $web_conf)" ]; then +web_include=$(grep "$conf" $web_conf ) +if [ -z "$web_include" ] && [ "$WEB_SYSTEM" != 'nginx' ]; then echo "Include $conf" >> $web_conf fi +if [ -z "$web_include" ] && [ "$WEB_SYSTEM" = 'nginx' ]; then + echo "include $conf;" >> $web_conf +fi # Checking proxy if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then