From owner-freebsd-questions Thu Mar 7 9:19:35 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by hub.freebsd.org (Postfix) with SMTP id BE76037B41A for ; Thu, 7 Mar 2002 09:19:21 -0800 (PST) Received: (qmail 24094 invoked by uid 0); 7 Mar 2002 17:19:20 -0000 Received: from tk212017108240.univie.teleweb.at (HELO Deadcell.ant) (212.17.108.240) by mail.gmx.net (mp007-rz3) with SMTP; 7 Mar 2002 17:19:20 -0000 Received: (from ant@localhost) by Deadcell.ant (8.11.6/8.11.6) id g27HJJ494577 for freebsd-questions@freebsd.org; Thu, 7 Mar 2002 18:19:19 +0100 (CET) (envelope-from ant) 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? Message-ID: <20020307181919.A94491@Deadcell.ant> Mail-Followup-To: freebsd-questions@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i 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 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