Need help to write upstart script for newrelic plugin
Clint Byrum
clint at ubuntu.com
Thu Feb 6 06:26:07 UTC 2014
Excerpts from Mariano González's message of 2014-02-05 09:55:59 -0800:
> Hi there.
>
> I'm trying to monitor a newrelic plugin service with upstart in CentOS 6.x.
>
> Here's newrelic plugin script: https://gist.github.com/Mariano-gon/8829482
>
> Here's my upstart script: https://gist.github.com/Mariano-gon/8827034
>
> When I try to restart it, it'll respawn x times and then stops itself.
>
> Here're the log lines: https://gist.github.com/Mariano-gon/8829533
>
https://gist.github.com/Mariano-gon/8827034#file-newrelic_rs-conf-L7
exec means you will never reach the next line. There is a declarative
way to change dirs, so you don't need the script stanza at all:
---
respawn
chdir /path/to/plugin_installation
exec bundle exec ./bin/newrelic_rs
---
Note that if you want it to start at boot, don't use any of the weird
compound start ons you see:
start on runlevel [2345]
stop on runlevel [016]
Those two should be fine.
More information about the upstart-devel
mailing list