added http{,s}_proxy initialization where needed

This commit is contained in:
levasseur
2021-09-13 11:30:24 +02:00
parent 19f6962bdc
commit bdac33284e

View File

@@ -34,7 +34,7 @@ export LC_ALL=C
export LANG=C export LANG=C
# Version of init # Version of init
export VERSION="0.99.3" export VERSION="0.99.4"
# Store script's path # Store script's path
export MYPATH=$(dirname $0) export MYPATH=$(dirname $0)
@@ -105,6 +105,12 @@ load_configuration
process_commandline_and_vars process_commandline_and_vars
# Declare proxy system vars if needed and if not already declared
if [[ -n $PROXYSRV && -n $PROXYSRVPORT ]]; then
export http_proxy=${http_proxy:-"http://$PROXYSRV:$PROXYSRVPORT/"}
export https_proxy=${https_proxy:-"http://$PROXYSRV:$PROXYSRVPORT/"}
fi
# Reinit stage file if no resuming # Reinit stage file if no resuming
if [[ $RESUME != true ]]; then if [[ $RESUME != true ]]; then
[[ -f $STAGE_FILE ]] && rm -f $STAGE_FILE [[ -f $STAGE_FILE ]] && rm -f $STAGE_FILE