Skip site navigation (1)Skip section navigation (2)
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?
Message-ID:  <20020307181919.A94491@Deadcell.ant>

next in thread | raw e-mail | index | archive | help
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




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