]>
Commit | Line | Data |
---|---|---|
b3f09dd8 MT |
1 | #!/bin/sh |
2 | ######################################################################## | |
3 | # Begin $rc_base/init.d/fetchmail | |
4 | # | |
5 | # Description : Fetchmail Init Script | |
6 | # | |
7 | # Authors : Michael Tremer (ms@ipfire.org) | |
8 | # | |
9 | # Version : 01.00 | |
10 | # | |
11 | # Notes : | |
12 | # | |
13 | ######################################################################## | |
14 | ||
15 | . /etc/sysconfig/rc | |
16 | . ${rc_functions} | |
17 | ||
18 | case "${1}" in | |
19 | start) | |
20 | boot_mesg "Starting fetchmail daemon..." | |
ea4d2584 | 21 | /usr/bin/fetchmail --daemon 300 -f '/root/.fetchmailrc' >/dev/null 2>&1 |
b3f09dd8 MT |
22 | evaluate_retval |
23 | ;; | |
24 | ||
25 | stop) | |
26 | boot_mesg "Stopping fetchmail daemon..." | |
27 | killproc /usr/bin/fetchmail | |
28 | ;; | |
29 | ||
30 | reload) | |
31 | boot_mesg "Reloading fetchmail daemon..." | |
32 | reloadproc /usr/bin/fetchmail | |
33 | ;; | |
34 | ||
35 | restart) | |
36 | ${0} stop | |
37 | sleep 1 | |
38 | ${0} start | |
39 | ;; | |
40 | ||
41 | status) | |
42 | statusproc /usr/bin/fetchmail | |
43 | ;; | |
44 | ||
45 | *) | |
46 | echo "Usage: ${0} {start|stop|reload|restart|status}" | |
47 | exit 1 | |
48 | ;; | |
49 | esac | |
50 | ||
51 | # End $rc_base/init.d/fetchmail |