From 8e89f8c35ae710c29a87b4f923fc225c6b2708bf Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Fri, 12 Jun 2009 07:04:35 -0400
Subject: [PATCH] Fixed getmail error in log when no getmail accounts had been created.

---
 /dev/null                     |    2 --
 server/scripts/run-getmail.sh |    6 +++++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/server/scripts/getmail.sh b/server/scripts/getmail.sh
deleted file mode 100644
index cf9160a..0000000
--- a/server/scripts/getmail.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-getmail -g /etc/getmail/ -r /etc/getmail/*.conf
\ No newline at end of file
diff --git a/server/scripts/run-getmail.sh b/server/scripts/run-getmail.sh
index fab297d..998ecab 100644
--- a/server/scripts/run-getmail.sh
+++ b/server/scripts/run-getmail.sh
@@ -3,7 +3,11 @@
 cd /etc/getmail
 rcfiles=""
 for file in *.conf ; do
+if [ $file != "*.conf" ]; then
 rcfiles="$rcfiles -r $file"
+fi
 done
 #echo $rcfiles
-exec /usr/bin/getmail -n -v -g /etc/getmail $rcfiles
\ No newline at end of file
+if [ "$rcfiles" != "" ]; then
+exec /usr/bin/getmail -n -v -g /etc/getmail $rcfiles
+fi
\ No newline at end of file

--
Gitblit v1.9.1