mirror of
https://github.com/clearlinux/koji-setup-scripts.git
synced 2026-04-28 11:03:50 +00:00
Add proxy variables if defined by environment
kojid will not be able to merge repos and mock will not be able to build a chroot in an environment where proxy variables are used unless they are defined in configuration files. Signed-off-by: George T Kramer <george.t.kramer@intel.com>
This commit is contained in:
@@ -328,6 +328,18 @@ ca = $KOJI_PKI_DIR/koji_ca_cert.crt
|
||||
serverca = $KOJI_PKI_DIR/koji_ca_cert.crt
|
||||
EOF
|
||||
|
||||
if env | grep -q proxy; then
|
||||
echo "yum_proxy = $https_proxy" >> /etc/kojid/kojid.conf
|
||||
mkdir -p /etc/systemd/system/kojid.service.d
|
||||
cat > /etc/systemd/system/kojid.service.d/00-proxy.conf <<- EOF
|
||||
[Service]
|
||||
Environment=http_proxy=$http_proxy
|
||||
Environment=https_proxy=$https_proxy
|
||||
Environment=no_proxy=$no_proxy
|
||||
EOF
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
systemctl enable --now kojid
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user