Skip to content

Commit

Permalink
fix: check yum and dnf conf for proxy aws linux
Browse files Browse the repository at this point in the history
  • Loading branch information
noahmmcgivern committed Sep 5, 2023
1 parent c1f33dc commit 99f221f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions recipes/newrelic/infrastructure/awslinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,26 @@ install:
if [ ! -z "$HTTPS_PROXY" ]; then
sed -i "/^proxy/d" /etc/newrelic-infra.yml
echo 'proxy: {{.HTTPS_PROXY}}' >> /etc/newrelic-infra.yml
if [ -e /etc/yum.conf ]; then
if ! grep -q '^proxy=' /etc/yum.conf; then
echo "************************************************************"
echo "WARNING: proxy settings not detected in your yum config"
echo "If installation fails with a timeout, add the following line to /etc/yum.conf and retry:"
echo "proxy={{.HTTPS_PROXY}}"
echo "************************************************************"
fi
fi
if [ -e /etc/dnf/dnf.conf ]; then
if ! grep -q '^proxy=' /etc/dnf/dnf.conf; then
echo "************************************************************"
echo "WARNING: proxy settings not detected in your dnf config"
echo "If installation fails with a timeout, add the following line to /etc/dnf/dnf.conf and retry:"
echo "proxy={{.HTTPS_PROXY}}"
echo "************************************************************"
fi
fi
fi
install_infra:
Expand Down

0 comments on commit 99f221f

Please sign in to comment.