Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Mar 2002 10:30:58 +0100
From:      Roman Neuhauser <neuhauser@mobil.cz>
To:        freebsd-questions@freebsd.org
Subject:   Re: Starting daemon only for user; gotta be simple?
Message-ID:  <20020308093058.GJ69695@roman.mobil.cz>
In-Reply-To: <20020307234843.G94491@Deadcell.ant> <20020307234706.F94491@Deadcell.ant>
References:  <20020307191109.B94491@Deadcell.ant> <NCBBIAMNAKDKFJIIGNPKMEMPHHAA.barry.byrne@wbtsystems.com> <20020307234843.G94491@Deadcell.ant> <20020307181919.A94491@Deadcell.ant> <20020307173719.GH54208@swansea.cableinet.net> <20020307191109.B94491@Deadcell.ant> <20020307184115.GH69695@roman.mobil.cz> <20020307234706.F94491@Deadcell.ant>

next in thread | previous in thread | raw e-mail | index | archive | help
> Date: Thu, 7 Mar 2002 23:47:06 +0100
> From: Andreas Ntaflos <ntaflos.andreas@gmx.net>
> Subject: Re: Starting daemon only for user; gotta be simple?
> 
> On Thu, Mar 07, 2002 at 07:41:15PM +0100, Roman Neuhauser wrote:
> >     crontab(1) and crontab(5)
> 
> Yeah yeah, crontab I know. There are many ways to get this stuff
> working, I just wanted to know a way similar to the
> /usr/local/etc/rc.d startup scripts, only for ordinary users. If such
> a way exists, that is.

    It does. It's crontab. :)

> Date: Thu, 7 Mar 2002 23:48:43 +0100
> From: Andreas Ntaflos <ntaflos.andreas@gmx.net>
> Subject: Re: Starting daemon only for user; gotta be simple?
> 
> On Thu, Mar 07, 2002 at 06:18:47PM -0000, Barry Byrne wrote:
> > Don't use fetchmail myself, but if you need to start it from a
> > startup script but run as a different user, use su with the -c
> > option.
> > 
> > su USERNAME -c '/path/to/fetchmail -d 60'
> 
> Now that sounds promising! I'll go and try it out, this might be what
> I was looking for.

    Looks like you want to make it hard on yourself. Why don't you just
    put fetchmail in your crontab file? If you insist on running it in
    the "daemon" mode, you can set the crontab line to run at system
    start only.

    Or, if you want to "mirror" the /usr/local/etc/rc.d/ way of running
    things, write a /bin/sh script that'll run scripts in your
    $HOME/etc/rc.d/, and put the script in your crontab.

-- 
FreeBSD 4.4-STABLE
10:23AM up 8 days, 11:30, 10 users, load averages: 0.04, 0.01, 0.00

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020308093058.GJ69695>