Skip to content

Commit b034c09

Browse files
committed
Fixed: FS#1060 - multiple execution of Fetchmail / Getmail causes high load
1 parent cdd80be commit b034c09

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

server/scripts/run-getmail.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ rcfiles="$rcfiles -r $file"
88
fi
99
done
1010
#echo $rcfiles
11-
if [ "$rcfiles" != "" ]; then
12-
exec /usr/bin/getmail -n -v -g /etc/getmail $rcfiles
11+
if [ -f /tmp/.getmail_lock ]; then
12+
echo 'Found getmail lock file /tmp/.getmail_lock, we quit here.'
13+
else
14+
touch /tmp/.getmail_lock
15+
if [ "$rcfiles" != "" ]; then
16+
exec /usr/bin/getmail -n -v -g /etc/getmail $rcfiles
17+
fi
18+
rm -f /tmp/.getmail_lock
1319
fi

0 commit comments

Comments
 (0)