supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Peter Hickman <peterhickman386@googlemail.com>
To: Wayne Marshall <wcm@b0llix.net>
Cc: supervision@list.skarnet.org
Subject: Re: Getting a process to run as root
Date: Fri, 27 Apr 2012 15:42:21 +0100	[thread overview]
Message-ID: <CALxYQy4r-_yOf01doiV=q9yBOphugks+WzdrSM3Ci_RcbsT7Aw@mail.gmail.com> (raw)
In-Reply-To: <CALxYQy77Sn5gBL7XMz+E=7-T=T8YkLyGzeCE_76XNW6PNu-cQg@mail.gmail.com>

There we go solved, in my case at least. I kept the
/etc/sv/runsvdir-log_watcher/run file as it was but changed the
/home/log_watcher/service/log_watcher/run file to this:

#!/bin/bash

set -e

EXEC="sudo -u log_watcher ruby log_watcher.rb known_logs.yml"

# Run the script.
cd /home/log_watcher/log_watcher/current
export RAILS_ENV=production
exec $EXEC

The significant change was adding the "sudo -u log_watcher" to the
EXEC string. To be honest it seems horribly convoluted but it seems to
work just fine.

Again thanks for the help.


  reply	other threads:[~2012-04-27 14:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-25 10:20 Peter Hickman
2012-04-25 13:07 ` Wayne Marshall
2012-04-26 15:11   ` Peter Hickman
2012-04-26 18:49     ` Wayne Marshall
2012-04-27  9:18       ` Peter Hickman
2012-04-27 11:13         ` Wayne Marshall
2012-04-27 13:44           ` Peter Hickman
2012-04-27 14:42             ` Peter Hickman [this message]
2012-04-27 14:56               ` Charlie Brady
2012-04-28  1:17                 ` Laurent Bercot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALxYQy4r-_yOf01doiV=q9yBOphugks+WzdrSM3Ci_RcbsT7Aw@mail.gmail.com' \
    --to=peterhickman386@googlemail.com \
    --cc=supervision@list.skarnet.org \
    --cc=wcm@b0llix.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).