3 # fetchmail This shell script takes care of starting and stopping
6 # chkconfig: 2345 81 45
7 # description: The Fetchmail daemons allows to retrieve mail using various
8 # mail protocols and route them to the local MTA just as if
9 # the mail was sent directly to the local MTA. This is
10 # specially useful on intermittent dial-up connections.
11 # processname: fetchmail
12 # config: /etc/fetchmailrc
14 # Andrea Sterbini <a.sterbini@itelcad.it>
15 # ObiTuarY <obituary@freshmeat.net>
17 . /etc/rc.d/init.d/functions
19 # Source networking configuration.
20 . /etc/sysconfig/network
22 # Check that networking is up.
23 if [ ${NETWORKING} = "no" ]
28 # See how we were called.
31 if [ -s /etc/fetchmailrc ]; then
32 echo -n "Loading fetchmail: "
33 daemon /usr/bin/fetchmail -f /etc/fetchmailrc
35 touch /var/lock/subsys/fetchmail
41 echo -n "Shutting down fetchmail: "
42 /usr/bin/fetchmail -q >/dev/null 2>&1 && echo fetchmail
44 rm -f /var/lock/subsys/fetchmail
54 echo "Usage: fetchmail {start|stop|status|restart|reload}"