python/env make sure requests library uses system certificate store when being called from cron or configd (set REQUESTS_CA_BUNDLE)

This commit is contained in:
Ad Schellevis 2020-08-18 20:27:22 +02:00
parent 71e1393b73
commit ae36505873
2 changed files with 2 additions and 0 deletions

View File

@ -996,6 +996,7 @@ function system_cron_configure($verbose = false, $defer = false)
$crontab_contents .= "# /etc/crontab, see the crontab(5) manual page.\n";
$crontab_contents .= "SHELL=/bin/sh\n";
$crontab_contents .= "PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin\n";
$crontab_contents .= "REQUESTS_CA_BUNDLE=/usr/local/etc/ssl/cert.pem\n";
$crontab_contents .= "#minute\thour\tmday\tmonth\twday\tcommand\n";
foreach ($autocron as $item) {

View File

@ -5,3 +5,4 @@ pid_filename:/var/run/configd.pid
[environment]
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
HOME=/
REQUESTS_CA_BUNDLE=/usr/local/etc/ssl/cert.pem