summaryrefslogtreecommitdiffstats
path: root/src/usr/local/sbin/pfSense-upgrade
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2016-04-19 15:10:03 -0400
committerjim-p <jimp@pfsense.org>2016-04-19 15:10:35 -0400
commita7fcbc1ec9ed1a8f0ca83c85281250bea777f262 (patch)
tree15db3ccac84412e95630762bf93b8ba7421581f3 /src/usr/local/sbin/pfSense-upgrade
parentd1ee3405d2cfdfd3ee79743586655a8b999f770e (diff)
downloadpfsense-a7fcbc1ec9ed1a8f0ca83c85281250bea777f262.zip
pfsense-a7fcbc1ec9ed1a8f0ca83c85281250bea777f262.tar.gz
Setup HTTP_PROXY environment variable for pkg when it's called from the GUI and also for pfSense-upgrade
Diffstat (limited to 'src/usr/local/sbin/pfSense-upgrade')
-rwxr-xr-xsrc/usr/local/sbin/pfSense-upgrade10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/usr/local/sbin/pfSense-upgrade b/src/usr/local/sbin/pfSense-upgrade
index 051c0b8..b5b7e5a 100755
--- a/src/usr/local/sbin/pfSense-upgrade
+++ b/src/usr/local/sbin/pfSense-upgrade
@@ -732,6 +732,16 @@ pid_file="/var/run/$(basename $0).pid"
logfile="/cf/conf/upgrade_log.txt"
stdout='/dev/null'
+# Setup proxy settings
+HTTP_PROXY=$(/usr/local/sbin/read_xml_tag.sh string system/proxyurl)
+if [ "${HTTP_PROXY}" != "" ]; then
+ HTTP_PROXY_PORT=$(/usr/local/sbin/read_xml_tag.sh string system/proxyport)
+ if [ "${HTTP_PROXY_PORT}" != "" ]; then
+ HTTP_PROXY="${HTTP_PROXY}:${HTTP_PROXY_PORT}"
+ fi
+ export HTTP_PROXY
+fi
+
# pkg should not ask for confirmations
export ASSUME_ALWAYS_YES=true
OpenPOWER on IntegriCloud