Re: Start Fetchmail as Daemon at Boot?
On Sun, Aug 15, 1999 at 10:03:47PM -0700, Mark Wagnon wrote:
| Hi all,
|
| I've been typing fetchmail -d 300 to start up fetchmail after
| rebooting in order to get my mail. I seem to be rebooting often,
Are you always connected to the internet? If not you may only want to
run fetchmail when your connection is up. In my case, I'm the only
user on my machine, so I have a ~/.fetchmailrc directing the fetchmail
daemon what to do. Then, I put I script in /etc/ppp/ip-up.d named
fetchmail that runs when my ppp connection is up. I basically gleaned
this from somewhere(??). It runs under my user permissions, though
there is certainly a way to run it as user mail and have it get all of
the mail for all of your users based on their ~/.fetchmailrc entries.
#!/bin/sh
PATH=$PATH:/sbin:/usr/sbin
export PATH
su -c 'fetchmail -d 300' eric
I also have a script in /etc/ppp/ip-down.d named fetchmail to stop the
daemon. Though, I'm not sure this is necessary.
#!/bin/sh
# Kill fetchmail
PATH=$PATH:/sbin/usr/sbin
export $PATH
su -c 'fetchmail --quit' eric
If you're always connected, you could put a script in /etc/init.d and
link it to the various runlevels using update-rc.d. You'll want to
give it a high number, like S99fetchmail so it's one of the last
things to get started.
--
Eric G. Miller
Powered by the POTATO (http://www.debian.org)!
Reply to: