Skip to content

Commit e7a9250

Browse files
committed
more tweaks on the proxy settings
1 parent e7e710b commit e7a9250

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

scripts/snappy.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,17 @@ else
6262
if [ "$PROXY_HOST" -a "$PROXY_PORT" ] ; then
6363
# Set both HTTP and HTTPS proxy environment variables
6464
export HTTP_PROXY="http://$PROXY_HOST:$PROXY_PORT"
65+
export http_proxy="http://$PROXY_HOST:$PROXY_PORT"
6566
export HTTPS_PROXY="http://$PROXY_HOST:$PROXY_PORT"
67+
export https_proxy="http://$PROXY_HOST:$PROXY_PORT"
6668
echo "===> Proxy configured: $HTTP_PROXY"
6769

6870
# check for auth tyo add auth
6971
if [ "$PROXY_USER" -a "$PROXY_PASS" ] ; then
7072
export HTTP_PROXY="http://$PROXY_USER:$PROXY_PASS@$PROXY_HOST:$PROXY_PORT"
73+
export http_proxy="http://$PROXY_USER:$PROXY_PASS@$PROXY_HOST:$PROXY_PORT"
7174
export HTTPS_PROXY="http://$PROXY_USER:$PROXY_PASS@$PROXY_HOST:$PROXY_PORT"
75+
export https_proxy="http://$PROXY_USER:$PROXY_PASS@$PROXY_HOST:$PROXY_PORT"
7276
echo "===> Proxy authentication enabled for user: $PROXY_USER"
7377
fi
7478
fi
@@ -78,8 +82,7 @@ else
7882
R=$?
7983

8084
# Unset proxy variables to avoid get them used locally
81-
unset HTTP_PROXY
82-
unset HTTPS_PROXY
85+
unset HTTP_PROXY; unset http_proxy; unset HTTPS_PROXY; unset https_proxy
8386
fi
8487

8588
# check if download fails
@@ -203,10 +206,6 @@ if [ "$WEBSERVER_HTTP_ENABLED" == "yes" ]; then
203206
OPTS="--no-hsts"
204207
fi
205208

206-
# forcibly disable any proxy setting
207-
export HTTP_PROXY=""; export HTTPS_PROXY=""; export http_proxy=""; export https_proxy=""; export socks_proxy=""
208-
unset HTTP_PROXY; unset HTTPS_PROXY; unset http_proxy; unset https_proxy; unset socks_proxy
209-
210209
echo -n "Waiting for SnappyMail to be ready..."
211210
while [ ! -f "$PASS" ] ; do
212211
# triggers the initial setup

0 commit comments

Comments
 (0)