Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Mar 2002 17:37:19 +0000
From:      Burhan Nazir <burhan@blueyonder.co.uk>
To:        Andreas Ntaflos <ntaflos.andreas@gmx.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Starting daemon only for user; gotta be simple?
Message-ID:  <20020307173719.GH54208@swansea.cableinet.net>
In-Reply-To: <20020307181919.A94491@Deadcell.ant>
References:  <20020307181919.A94491@Deadcell.ant>

next in thread | previous in thread | raw e-mail | index | archive | help
Oh dear, that sounds like way too much work.  Try this instead:

fetchmail -d 60

This will run fetchmail in deamon mode and will poll your servers (defined in
.fetchmailrc) every 60 seconds.

Hope this helps!

-Burhan

Andreas Ntaflos wrote:

> Delivered-To: freebsd-questions@freebsd.org
> Date: Thu, 7 Mar 2002 18:19:19 +0100
> From: Andreas Ntaflos <ntaflos.andreas@gmx.net>
> To: freebsd-questions@freebsd.org
> Subject: Starting daemon only for user; gotta be simple?
> User-Agent: Mutt/1.2.5.1i
> List-ID: <freebsd-questions.FreeBSD.ORG>
> List-Archive: <http://docs.freebsd.org/mail/>; (Web Archive)
> List-Help: <mailto:majordomo@FreeBSD.ORG?subject=help> (List Instructions)
> List-Subscribe: <mailto:majordomo@FreeBSD.ORG?subject=subscribe%20freebsd-questions>
> List-Unsubscribe: <mailto:majordomo@FreeBSD.ORG?subject=unsubscribe%20freebsd-questions>
> X-Loop: FreeBSD.ORG
> Precedence: bulk
> 
> 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.
>   
>   I hope that was not too confusing, excuse my English, I am a quite exhausted
>   and tired after a long day in school :)
> 
> Thanks and regards
> -- 
> 	Andreas "ant" Ntaflos	
> 	ntaflos.andreas@gmx.net
> 	Vienna, AUSTRIA
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message

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?20020307173719.GH54208>