diff --git a/recipes/newrelic/infrastructure/awslinux.yml b/recipes/newrelic/infrastructure/awslinux.yml index f6b43503a..0d27a405f 100644 --- a/recipes/newrelic/infrastructure/awslinux.yml +++ b/recipes/newrelic/infrastructure/awslinux.yml @@ -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: diff --git a/recipes/newrelic/infrastructure/centos_rhel.yml b/recipes/newrelic/infrastructure/centos_rhel.yml index 142a580e0..bb18ba89f 100644 --- a/recipes/newrelic/infrastructure/centos_rhel.yml +++ b/recipes/newrelic/infrastructure/centos_rhel.yml @@ -162,12 +162,24 @@ install: sed -i "/^proxy/d" /etc/newrelic-infra.yml echo 'proxy: {{.HTTPS_PROXY}}' >> /etc/newrelic-infra.yml - 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 "************************************************************" + 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