Skip to content

Commit d2e01fa

Browse files
committed
added check for web server type in SSL config, closes hestiacp#626
1 parent 1689ea3 commit d2e01fa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

bin/v-add-web-domain-ssl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,15 @@ if [ -x $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.sh ]; then
9090
$user $domain $ip $HOMEDIR $sdocroot
9191
fi
9292

93-
# Checking web config
93+
# Checking web config include
9494
web_conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf"
95-
if [ -z "$(grep "$conf" $web_conf)" ]; then
95+
web_include=$(grep "$conf" $web_conf )
96+
if [ -z "$web_include" ] && [ "$WEB_SYSTEM" != 'nginx' ]; then
9697
echo "Include $conf" >> $web_conf
9798
fi
99+
if [ -z "$web_include" ] && [ "$WEB_SYSTEM" = 'nginx' ]; then
100+
echo "include $conf;" >> $web_conf
101+
fi
98102

99103
# Checking proxy
100104
if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then

0 commit comments

Comments
 (0)