diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-11-11 11:57:38 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-11-11 11:57:38 -0200 |
commit | 992f60d0fb3f309dafe5465f69c1af45a839d227 (patch) | |
tree | 48055b8f8d919590ded77a8b9fc5bd7fe92e2ada /root/.shrc | |
parent | eacdbc4d6a41690fc6e703f767eee573c7e046c6 (diff) | |
download | pfsense-992f60d0fb3f309dafe5465f69c1af45a839d227.zip pfsense-992f60d0fb3f309dafe5465f69c1af45a839d227.tar.gz |
Set proxy env vars on interactive shell and also on crontab to make all scripts be able to use it. Ticket #3789
Diffstat (limited to 'root/.shrc')
-rw-r--r-- | root/.shrc | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1,3 +1,12 @@ +HTTP_PROXY=`/usr/local/bin/xmllint --xpath 'string(//pfsense/system/proxyurl)' /conf/config.xml` +if [ "${HTTP_PROXY}" != "" ]; then + HTTP_PROXY_PORT=`/usr/local/bin/xmllint --xpath 'string(//pfsense/system/proxyport)' /conf/config.xml` + if [ "${HTTP_PROXY_PORT}" != "" ]; then + HTTP_PROXY="${HTTP_PROXY}:${HTTP_PROXY_PORT}" + fi + export HTTP_PROXY +fi + # Detect interactive logins and display the shell if [ -n "${SSH_TTY}" -o "${TERM}" = "cons25" ]; then /etc/rc.initial |