Skip to content
This repository has been archived by the owner on Apr 21, 2020. It is now read-only.

fix problems that arise when not root #33

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

kplimack
Copy link

according to [https://docs.newrelic.com/docs/servers/new-relic-servers-linux/installation-configuration/servers-installation-other-linux#user], the newrelic user should be created with shell /sbin/nologin. the init script cannot run without a shell, so by providing -s /bin/bash, it can.
additionally, the newrelic user cannot install system gems, so the gems should be vendored.

@@ -32,7 +32,7 @@ start() {
echo "Starting $NAME"
cd $DAEMONDIR
touch $PIDFILE ; chown <%= @user %> $PIDFILE
su <%= @user %> -c "<%= @run_command %> $DAEMON >> $DAEMONDIR/plugin_daemon.log 2>&1 & echo \$! > $PIDFILE"
su <%= @user %> -s '/bin/bash' -c "<%= @run_command %> $DAEMON >> $DAEMONDIR/plugin_daemon.log 2>&1 & echo \$! > $PIDFILE"
Copy link

@neclimdul neclimdul Apr 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's the problem I've been fighting with all afternoon.

@metavida
Copy link

Yes! The -s /bin/bash option is exactly what got me un-stuck too.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants