Date: Fri, 8 Mar 2002 09:18:47 +0000 From: Mark Drayton <mark.drayton@izrsolutions.com> To: Andreas Ntaflos <ntaflos.andreas@gmx.net> Cc: freebsd-questions@freebsd.org Subject: Re: Starting daemon only for user; gotta be simple? Message-ID: <20020308091847.B29331@drex.staff.izr.com> In-Reply-To: <20020307181919.A94491@Deadcell.ant>; from ntaflos.andreas@gmx.net on Thu, Mar 07, 2002 at 06:19:19PM %2B0100 References: <20020307181919.A94491@Deadcell.ant>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Andreas,
Andreas Ntaflos (ntaflos.andreas@gmx.net) wrote:
> Hi all, This is about fetchmail, but also a general question on how to
> start a process or daemon at login time or boot time only once.
>
> I want to have fetchmail running in daemon mode, so I put the
> according entry into my .fetchmailrc: set daemon 900 for example.
> But the daemon gets started only when I run fetchmail once manually
> on the command line.
>
> I am looking for a way to have this task automated. A script in
> /usr/local/etc/rc.d comes into mind, but this would start polling
> for mail only for root wouldn't it? Putting 'fetchmail' into .login
> would start it anytime the .login script is executed, that's every
> time I log into a new virtual terminal. A cron job for fetchmail is
> another workaround which in fact I used for months before I
> discovered the set daemon option.
>
> Of course, I could write a script that checks which tty I log into
> and execute fetchmail (or anything else) only when it's ttyv0 for
> example. But is there a better way to do such things? An equivalent
> to /usr/local/etc/rc.d only for regular users instead of root? I may
> have not R enough of TFM but I did not stumble across anything that
> would answer my question.
man 5 crontab:
Instead of the first five fields, one of eight special strings may
appear:
string meaning
------ -------
@reboot Run once, at startup.
How about this?
> I hope that was not too confusing, excuse my English, I am a quite
> exhausted and tired after a long day in school :)
It's better than mine and I'm English!
Cheers,
--
Mark Drayton
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?20020308091847.B29331>
