summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-11-11 11:57:38 -0200
committerRenato Botelho <garga@FreeBSD.org>2014-11-11 11:57:38 -0200
commit992f60d0fb3f309dafe5465f69c1af45a839d227 (patch)
tree48055b8f8d919590ded77a8b9fc5bd7fe92e2ada /etc
parenteacdbc4d6a41690fc6e703f767eee573c7e046c6 (diff)
downloadpfsense-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 'etc')
-rw-r--r--etc/inc/services.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index 608d412..2ab55ec 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -2272,6 +2272,13 @@ function configure_cron() {
$crontab_contents .= "# " .gettext( "Created:") . " " . date("F j, Y, g:i a") . "\n";
$crontab_contents .= "#\n";
+ if (isset($config['system']['proxyurl']) && !empty($config['system']['proxyurl'])) {
+ $http_proxy = $config['system']['proxyurl'];
+ if (isset($config['system']['proxyport']) && !empty($config['system']['proxyport']))
+ $http_proxy .= ':' . $config['system']['proxyport'];
+ $crontab_contents .= "HTTP_PROXY={$http_proxy}";
+ }
+
foreach ($config['cron']['item'] as $item) {
$crontab_contents .= "\n{$item['minute']}\t";
$crontab_contents .= "{$item['hour']}\t";
OpenPOWER on IntegriCloud