Ticket #10924: fetchmail.wrapper
File fetchmail.wrapper, 469 bytes (added by aurelien.dehay@…, 18 years ago) |
---|
Line | |
---|---|
1 | #!/bin/sh |
2 | # |
3 | # MacPorts generated daemondo support script |
4 | # |
5 | |
6 | # |
7 | # Init |
8 | # |
9 | prefix=/opt/local |
10 | |
11 | # |
12 | # Start |
13 | # |
14 | Start() |
15 | { |
16 | /opt/local/bin/fetchmail -f /opt/local/etc/.fetchmail -d120 |
17 | } |
18 | |
19 | # |
20 | # Stop |
21 | # |
22 | Stop() |
23 | { |
24 | /opt/local/bin/fetchmail -quit |
25 | } |
26 | |
27 | # |
28 | # Restart |
29 | # |
30 | Restart() |
31 | { |
32 | Stop |
33 | Start |
34 | } |
35 | |
36 | # |
37 | # Run |
38 | # |
39 | Run() |
40 | { |
41 | case $1 in |
42 | start ) Start ;; |
43 | stop ) Stop ;; |
44 | restart) Restart ;; |
45 | * ) echo "$0: unknown argument: $1";; |
46 | esac |
47 | } |
48 | |
49 | # |
50 | # Run a phase based on the selector |
51 | # |
52 | Run $1 |
53 |