On Wed, Apr 13, 2011 at 8:49 PM, <jarrod.rober...@gmail.com> wrote:

> Thanks for the monit instructions, but the gitorious-poller script I have
> doesn't seem to do what the monit recipe is expecting.
>
> #!/bin/sh
> #
> # poller Startup script for Gitorious's poller
> #
> # chkconfig: - 86 15
> # description: Gitorious's poller script is simple worker that polls \
> # tasks from stomp server queue and executes them.
> # processname: poller
>
> /bin/su - git -c "/var/www/gitorious/script/poller $@"
>
>
> Does anyone have a better script to use for the poller?
>

I can see a few potential problems with using this script:
- The use of /bin/su - git isn't required, since Monit will do this for you
("as uid git and gid git")
- Monit uses exec IIRC, so you'll need a shell to run it
- PATH isn't set up correctly

We use a separate control script that's called from Monit, like this:

#!/bin/bash

cd $GITORIOUS_ROOT
/usr/bin/env PATH=<at least the path to Ruby>:$PATH RAILS_ENV=production
HOME=<git user's home> bundle exec script/poller $1

And then call it like this from Monit:

-- 
To post to this group, send email to gitorious@googlegroups.com
To unsubscribe from this group, send email to
gitorious+unsubscr...@googlegroups.com

Reply via email to