4 # description: Starts and stops the fetchmail daemon used to retrive mail via
5 # various protocols (such as POP3 and IMAP4).
7 # config: /etc/fetchmailrc
9 export PATH=/bin:/sbin:/usr/bin:/usr/sbin
11 # Source function library.
12 . /etc/rc.d/init.d/functions
14 # Source networking configuration.
15 . /etc/sysconfig/network
17 # Demon specified configuration.
18 . /etc/sysconfig/fetchmail
20 # Check that networking is up.
21 [ "${NETWORKING}" = "no" ] && exit 0
23 # Check that fetchmailrc exists.
24 [ -f /etc/fetchmailrc ] || exit 0
26 # See how we were called.
29 show Starting fetchmail
30 daemon $NICELEVEL fetchmail -f /etc/fetchmailrc
31 touch /var/lock/subsys/fetchmail
34 show Stopping fetchmail
36 rm -f /var/lock/subsys/fetchmail
46 echo "Usage: $0 {start|stop|restart|status}"