Skip to content

Commit 8370a8d

Browse files
author
Kristan Kenney
committed
Fix condition in upgrade script
1 parent 85f5475 commit 8370a8d

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

install/upgrade/versions/1.3.1.sh

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,11 @@
88

99
# Update nginx configuration to block connections for unsigned (no SSL certificate) domains
1010
for ipaddr in $(ls /usr/local/hestia/data/ips/ 2>/dev/null); do
11-
web_conf="/etc/$WEB_SYSTEM/conf.d/$ipaddr.conf"
11+
web_conf="/etc/$PROXY_SYSTEM/conf.d/$ipaddr.conf"
1212

13-
if [ "$WEB_SYSTEM" = "nginx" ]; then
13+
if [ "$PROXY_SYSTEM" = "nginx" ]; then
14+
echo "[ * ] Hardening nginx SSL SNI configuration..."
1415
cp -f $HESTIA_INSTALL_DIR/nginx/unassigned.inc $web_conf
1516
sed -i 's/directIP/'$ipaddr'/g' $web_conf
1617
fi
17-
18-
if [ "$PROXY_SYSTEM" = "nginx" ]; then
19-
echo "[ * ] Adding unassigned hosts configuration to Nginx..."
20-
cat $WEBTPL/$PROXY_SYSTEM/proxy_ip.tpl |\
21-
sed -e "s/%ip%/$ipaddr/g" \
22-
-e "s/%web_port%/$WEB_PORT/g" \
23-
-e "s/%proxy_port%/$PROXY_PORT/g" \
24-
> /etc/$PROXY_SYSTEM/conf.d/$ipaddr.conf
25-
fi
2618
done

0 commit comments

Comments
 (0)