Trying to write an upstart script for a newrelic agent
Steve Langasek
steve.langasek at ubuntu.com
Tue Feb 18 19:01:36 UTC 2014
On Tue, Feb 18, 2014 at 08:56:37AM -0300, Mariano González wrote:
> Hi Steve and Clint. Thanks for your comments.
> You're totally right, it's not necessary to write sudo -u root as it's the
> same as writing sudo. My fault there.
> But, the command to run the agent is the following:
> $ cd /path/newrelic_rs_dfw/
> $ bundle exec ./bin/newrelic_rs
upstart has a 'chdir' primitive you can use for this.
chdir /path/newrelic_rs_dfw
exec ./bundle exec ./bin/newrelic_rs
(I'm assuming that 'bundle' is in the local directory, and not something on
the system path.)
> As bundle exec is a ruby gem located in /path/newrelic_rs_dfw/. So, to this
> script to function it'd need to locate in /path/newrelic_rs_dfw/ first and
> then run the bundle exec. Which it doesn't do if I write down those two
> previous steps in a script. Neither it does if I specify an env variable or
> source stanza. That's why I think this is an env issue.
What env variable would you expect to be setting here? That's the wrong
tool for changing the directory.
> Finally, there's no trace of newrelic logs in /var/log/ besides /newrelic/
> folder where OTHER newrelic agents does write their logs in this vm.
What version of upstart are you using?
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slangasek at ubuntu.com vorlon at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/upstart-devel/attachments/20140218/9a373e58/attachment-0001.pgp>
More information about the upstart-devel
mailing list