Trying to write an upstart script for a newrelic agent
Mariano González
gonzalez.mariano.gabriel at gmail.com
Tue Feb 18 19:45:54 UTC 2014
Steve, again you're right.
The bundle isn't in /path/newrelic/. It's in /usr/bin/ (run which bundle
and got that).
Edited my upstart job to:
..
chdir path/newrelic
exec /usr/bin/bundle exec ./bin/newrelic_rs
..
Started the job and it's working!
Sorry about the dumb question, I'm just a newbie with Upstart. I'm running
CentOS 6.3 that's why (I think) don't have the latest version of Upstart.
Anyway, it's working and thanks again!
On 18 February 2014 16:36, Steve Langasek <steve.langasek at ubuntu.com> wrote:
> On Tue, Feb 18, 2014 at 04:17:16PM -0300, Mariano González wrote:
> > Steve
>
> > Tried what you suggested, newrelic_rs_dfw_test.conf:
>
> > # Upstart script
>
> > start on runlevel [2345]
> > stop on runlevel [016]
>
> > respawn
>
> > chdir /opt/turner/services/newrelic/newrelic_rs_dfw/
>
> > exec bundle exec bin/newrelic_rs
>
> That's not what I suggested. I wrote:
>
> exec ./bundle exec bin/newrelic_rs
>
> I don't think this 'bundle' command is on the system path.
>
> > init (upstart 0.6.5)
>
> Ok. You're quite a few upstart revisions - and almost two Ubuntu LTSes -
> behind. I would certainly recommend upgrading to Ubuntu 12.04 if you can,
> which would give you the upstart job logging support.
>
> > Run the bundle from the right folder:
>
> > [root at server newrelic_rs_dfw]# pwd
> > /path/newrelic/newrelic_rs_dfw
> > [root at server newrelic_rs_dfw]# bundle exec ./bin/newrelic_rs
> > [Tue Feb 18 19:13:23 UTC 2014] WARN: SSL is disabled by default when
> using
> > Ruby 1.8.x
>
> > And started normally.
>
> Yes, which probably means that 'bundle' is a command that's on the path
> when
> you run a login shell, but is not on the default path used by upstart. You
> can verify the location of the bundle command by running 'which bundle'.
>
> --
> 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
>
--
Mariano Gabriel González
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/upstart-devel/attachments/20140218/914072c7/attachment.html>
More information about the upstart-devel
mailing list