Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(installer): tarball installer checks for ini in mods-available #971

Merged
merged 3 commits into from
Oct 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions agent/newrelic-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1371,6 +1371,25 @@ EOF
if [ -d "${cfg_pfx}/fpm/conf.d" ]; then
pi_inidir_dso="${cfg_pfx}/fpm/conf.d"
fi

#
# Debian can use a mods-available directory to store the ini files.
# It creates a symlink from the ini file in the conf.d directory that
# our installer can fail to find (because the symlink is prefixed with
# "20-" (notably the number can change based on configurations).
# While this install script will not install into the mods-available
# directory, our .deb installer can. Therefore, we want to detect if
# newrelic has previously been installed in the mods-available directory
# so that we do not create an additional ini file -- which would result in
# the conf.d directory having both newrelic.ini and 20-newrelic.ini.
#

if [ -d "${cfg_pfx}/mods-available" -a -f "${cfg_pfx}/mods-available/newrelic.ini" ]; then
pi_inidir_cli="${cfg_pfx}/mods-available"
if [ -n "${pi_inidir_dso}" ]; then
pi_inidir_dso="${cfg_pfx}/mods-available"
fi
fi
fi
done

Expand Down