Re: fetchmail, mutt and crontab


Subject: Re: fetchmail, mutt and crontab
From: Paul Leclerc (pleclerc@yahoo.com)
Date: Fri Sep 10 1999 - 06:33:33 MDT


 
> So, questions. A) how can I get cron to get something
> to fire something
> up once in a session (I really haven't been able to

You could write a little shell script that checks to see
if it's running. If it is, just exit. If not, start it.

> find out) or B) how
> can I get a program specified in rc.local (or even in
> init.d and linked
> to from rc3.d) to run something as a user, not as root?

Most people think that "su" command only switches you to
the "root" user but in fact, you can "su" to anybody. In
your
rc.local script you could have a line like this:
   su - -c "/usr/local/bin/fetchmail" evanr

Since rc.local is run as root and root can su to anybody
without
a password, the su command will just run without
prompting
you for the password (which would not be a good thing
during
bootup!)

Paul

===
Paul Leclerc pleclerc@yahoo.com
Work: (208) 333-5734 Home: (208) 442-1047
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com



This archive was generated by hypermail 2a24 : Fri Oct 01 1999 - 16:13:43 MDT