public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] "User services" best practice?
@ 2006-11-13 11:22 Steve [Gentoo]
  2006-11-13 11:54 ` Neil Bothwick
  2006-11-13 14:20 ` Jorge Almeida
  0 siblings, 2 replies; 4+ messages in thread
From: Steve [Gentoo] @ 2006-11-13 11:22 UTC (permalink / raw
  To: gentoo-user

While system-level services are typically managed by /etc/init.d/* in
Gentoo, these are maintained by root for all users.  I'm interested in
an end-user without root access who wants to 'run a service-like
process' (for example, fectmail to poll remote accounts...)  While an
end user can easily run a daemon process or kill one, this doesn't
persist across a reboot.  I've tried using fcron to schedule user
processes to re-start after a re-boot... but this feels like a hack.

Is there a standard Gentoo way to solve this (I presume common) task?


-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] "User services" best practice?
  2006-11-13 11:22 [gentoo-user] "User services" best practice? Steve [Gentoo]
@ 2006-11-13 11:54 ` Neil Bothwick
  2006-11-13 14:20 ` Jorge Almeida
  1 sibling, 0 replies; 4+ messages in thread
From: Neil Bothwick @ 2006-11-13 11:54 UTC (permalink / raw
  To: gentoo-user

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

On Mon, 13 Nov 2006 11:22:07 +0000, Steve [Gentoo] wrote:

> While system-level services are typically managed by /etc/init.d/* in
> Gentoo, these are maintained by root for all users.  I'm interested in
> an end-user without root access who wants to 'run a service-like
> process' (for example, fectmail to poll remote accounts...)  While an
> end user can easily run a daemon process or kill one, this doesn't
> persist across a reboot.  I've tried using fcron to schedule user
> processes to re-start after a re-boot... but this feels like a hack.

I use /etc/conf.d/local.start for this; e.g.

su myuser -c "command  --some-arguments" &


-- 
Neil Bothwick

*/ \*         <- Tribbles having a swordfight

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] "User services" best practice?
  2006-11-13 11:22 [gentoo-user] "User services" best practice? Steve [Gentoo]
  2006-11-13 11:54 ` Neil Bothwick
@ 2006-11-13 14:20 ` Jorge Almeida
  2006-11-29 22:47   ` Brett I. Holcomb
  1 sibling, 1 reply; 4+ messages in thread
From: Jorge Almeida @ 2006-11-13 14:20 UTC (permalink / raw
  To: gentoo-user

On Mon, 13 Nov 2006, Steve [Gentoo] wrote:

> While system-level services are typically managed by /etc/init.d/* in
> Gentoo, these are maintained by root for all users.  I'm interested in
> an end-user without root access who wants to 'run a service-like
> process' (for example, fectmail to poll remote accounts...)  While an
> end user can easily run a daemon process or kill one, this doesn't
> persist across a reboot.  I've tried using fcron to schedule user
> processes to re-start after a re-boot... but this feels like a hack.
>
Use daemontools. It's in portage. Take a look at this site, which is
beginner-friendly:
http://www.thedjbway.org
A run script for fetchmail is in
http://smarden.org/runit/runscripts.html#fetchmail
but you can probably cook your own once you get used to daemontools.

You probably want your service to be kept alive, even when it goes down
for whatever reason other than rebooting, so daemontools seems the
proper solution.

I'm assuming you have root privileges but don't want to run services as
root when that's not really necessary. Otherwise, you'll need root's
cooperation.
-- 
Jorge Almeida
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] "User services" best practice?
  2006-11-13 14:20 ` Jorge Almeida
@ 2006-11-29 22:47   ` Brett I. Holcomb
  0 siblings, 0 replies; 4+ messages in thread
From: Brett I. Holcomb @ 2006-11-29 22:47 UTC (permalink / raw
  To: gentoo-user

If I remember correctly with fetchmail you can start it in local.start with a 
username parameter that is the same as if the user started it.  I did that 
and used the -d option to make it a daemon so it worked every boot.  For 
other services - they may not support that.

On Monday 13 November 2006 09:20, Jorge Almeida wrote:
> On Mon, 13 Nov 2006, Steve [Gentoo] wrote:
> > While system-level services are typically managed by /etc/init.d/* in
> > Gentoo, these are maintained by root for all users.  I'm interested in
> > an end-user without root access who wants to 'run a service-like
> > process' (for example, fectmail to poll remote accounts...)  While an
> > end user can easily run a daemon process or kill one, this doesn't
> > persist across a reboot.  I've tried using fcron to schedule user
> > processes to re-start after a re-boot... but this feels like a hack.
>
> Use daemontools. It's in portage. Take a look at this site, which is
> beginner-friendly:
> http://www.thedjbway.org
> A run script for fetchmail is in
> http://smarden.org/runit/runscripts.html#fetchmail
> but you can probably cook your own once you get used to daemontools.
>
> You probably want your service to be kept alive, even when it goes down
> for whatever reason other than rebooting, so daemontools seems the
> proper solution.
>
> I'm assuming you have root privileges but don't want to run services as
> root when that's not really necessary. Otherwise, you'll need root's
> cooperation.
> --
> Jorge Almeida

-- 

Brett I. Holcomb
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-11-29 22:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-13 11:22 [gentoo-user] "User services" best practice? Steve [Gentoo]
2006-11-13 11:54 ` Neil Bothwick
2006-11-13 14:20 ` Jorge Almeida
2006-11-29 22:47   ` Brett I. Holcomb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox