From owner-freebsd-questions Thu Mar 7 9:38: 0 2002 Delivered-To: freebsd-questions@freebsd.org Received: from swansea.cableinet.net (swansea.cableinet.net [194.117.142.65]) by hub.freebsd.org (Postfix) with ESMTP id 796F937B421 for ; Thu, 7 Mar 2002 09:37:26 -0800 (PST) Received: (from bnazir@localhost) by swansea.cableinet.net (8.11.6/8.11.6) id g27HbJg58130; Thu, 7 Mar 2002 17:37:19 GMT (envelope-from bnazir) Date: Thu, 7 Mar 2002 17:37:19 +0000 From: Burhan Nazir To: Andreas Ntaflos Cc: freebsd-questions@freebsd.org Subject: Re: Starting daemon only for user; gotta be simple? Message-ID: <20020307173719.GH54208@swansea.cableinet.net> References: <20020307181919.A94491@Deadcell.ant> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020307181919.A94491@Deadcell.ant> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 > To: freebsd-questions@freebsd.org > Subject: Starting daemon only for user; gotta be simple? > User-Agent: Mutt/1.2.5.1i > List-ID: > List-Archive: (Web Archive) > List-Help: (List Instructions) > List-Subscribe: > List-Unsubscribe: > 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