commit | author | age
|
bbe747
|
1 |
#!/bin/bash |
06d4a2
|
2 |
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin |
27c3a6
|
3 |
set -e |
T |
4 |
cd /etc/getmail |
|
5 |
rcfiles="" |
|
6 |
for file in *.conf ; do |
772fc1
|
7 |
if [ $file != "*.conf" ]; then |
J |
8 |
rcfiles="$rcfiles -r $file" |
|
9 |
fi |
27c3a6
|
10 |
done |
T |
11 |
#echo $rcfiles |
b034c0
|
12 |
if [ -f /tmp/.getmail_lock ]; then |
T |
13 |
echo 'Found getmail lock file /tmp/.getmail_lock, we quit here.' |
|
14 |
else |
|
15 |
touch /tmp/.getmail_lock |
|
16 |
if [ "$rcfiles" != "" ]; then |
615a0a
|
17 |
/usr/bin/getmail -v -g /etc/getmail $rcfiles || true |
b034c0
|
18 |
fi |
T |
19 |
rm -f /tmp/.getmail_lock |
772fc1
|
20 |
fi |