diff --git a/README.md b/README.md index 6bcfa52..03a545e 100644 --- a/README.md +++ b/README.md @@ -417,6 +417,7 @@ Here's the list of all the supported environment variables: | http, intl, mongodb | `IPE_ICU_EN_ONLY=1` | Some extensions require the ICU library, use this flag to install a smaller, but English-only, ICU library on Alpine 3.16 and later | | pspell | `IPE_ASPELL_LANGUAGES='...'` | Configure the languages to be made available (for example: `IPE_ASPELL_LANGUAGES='en fr'`). If omitted, we'll assume `en` | | | `IPE_DEB_ARCHIVE` & `IPE_DEB_ARCHIVE_SECURITY` | The APT packages of very old Debian versions (eg Jessie) may have been archived: you can use these environment variables to specify custom URLs of these APT archives | +| newrelic | `NR_INSTALL_KEY` | Your New Relic license key | ## Special requirements diff --git a/data/supported-extensions b/data/supported-extensions index b97b4a1..8b1ce89 100644 --- a/data/supported-extensions +++ b/data/supported-extensions @@ -61,6 +61,7 @@ msgpack 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 mssql 5.5 5.6 mysql 5.5 5.6 mysqli 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 +newrelic 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 oauth 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 oci8 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 odbc 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 diff --git a/install-php-extensions b/install-php-extensions index f77c8a6..0fa50f5 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -2364,6 +2364,32 @@ installCargo() { fi } +installNewRelic() { + printf '# Installing newrelic\n' + installNewRelic_search='\bnewrelic-php[0-9.]*-[0-9]+(\.[0-9]+)*-linux' + case "$DISTRO" in + alpine) + installNewRelic_search="$installNewRelic_search-musl" + ;; + esac + installNewRelic_file="$(curl -sSLf -o- https://download.newrelic.com/php_agent/release/ | sed -E 's/<[^>]*>//g' | grep -Eo "$installNewRelic_search.tar.gz" | sort | head -1)" + installNewRelic_url="https://download.newrelic.com/php_agent/release/$installNewRelic_file" + installNewRelic_src="$(getPackageSource "$installNewRelic_url")" + cd -- "$installNewRelic_src" + NR_INSTALL_USE_CP_NOT_LN=1 NR_INSTALL_SILENT=1 ./newrelic-install install + cd - >/dev/null + cat <