public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Neil Bothwick <neil@digimed.co.uk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Starting a daemon automatically without rc-update
Date: Wed, 12 Aug 2009 23:02:58 +0100	[thread overview]
Message-ID: <20090812230258.4f31b6b9@zaphod.digimed.co.uk> (raw)
In-Reply-To: <49bf44f10908121440o3764f861r6dfddcc4c4ce91c@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 638 bytes --]

On Wed, 12 Aug 2009 14:40:49 -0700, Grant wrote:

> I run one program which needs to be started as a particular user
> whenever the system comes up, but there is no ebuild.  Is this the
> Gentoo way?
> 
> # cat /etc/init.d/rc.local
> #!/sbin/runscript
> 
> start() {
> su user
> /path/to/program/binary
> }

Yes, or you could use

start() {
  su - user -c /path/to/program/binary
}

which runs the program with the user's full environment instead of
inheriting root's.


-- 
Neil Bothwick

C: (n.) the language following A and B. The world still awaits D and
   E. By Z, it may be acceptable for general use.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2009-08-12 22:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-12 21:40 [gentoo-user] Starting a daemon automatically without rc-update Grant
2009-08-12 22:02 ` Neil Bothwick [this message]
2009-08-12 22:50   ` [OT] " Peter Humphrey
2009-08-12 23:53   ` Grant
2009-08-13  0:55     ` Neil Bothwick
2009-08-13  5:12       ` Grant
2009-08-13 14:53       ` Dale
2009-08-13 20:17         ` Neil Bothwick
2009-08-13  1:30     ` [gentoo-user] " Nikos Chantziaras
2009-08-13  1:18   ` [gentoo-user] " Keith Dart

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=20090812230258.4f31b6b9@zaphod.digimed.co.uk \
    --to=neil@digimed.co.uk \
    --cc=gentoo-user@lists.gentoo.org \
    /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