Skip to content

Commit 6eb2244

Browse files
committed
fix(installer): better handle systemd installations
1 parent 68046f3 commit 6eb2244

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

agent/newrelic-install.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -852,13 +852,13 @@ disp_get_php_list() {
852852

853853
set_osdifile() {
854854
osdifile=
855-
if [ -n "${NR_INSTALL_INITFILE}" ]; then
856-
osdifile="${NR_INSTALL_INITFILE}"
855+
if [ -n "${NR_INSTALL_INITSCRIPT}" ]; then
856+
osdifile="${NR_INSTALL_INITSCRIPT}"
857857
fi
858858
if [ "${ostype}" = "darwin" ]; then
859859
: ${osdifile:=/usr/bin/newrelic-daemon-service}
860-
elif [ "${ostype}" = "freebsd" -o -f /etc/arch-release ]; then
861-
# It is possible that this is only for freebsd.
860+
elif [ -f /etc/arch-release -o ! -d /etc/init.d ]; then
861+
# Systems that use systemd instread of init scripts
862862
: ${osdifile:=/etc/rc.d/newrelic-daemon}
863863
else
864864
: ${osdifile:=/etc/init.d/newrelic-daemon}

0 commit comments

Comments
 (0)