Also does not croak truing to determine the spooldir when exim cannot
be found
---
 node/node.d/exim_mailqueue.in |   25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/node/node.d/exim_mailqueue.in b/node/node.d/exim_mailqueue.in
index d960794..17ec6db 100755
--- a/node/node.d/exim_mailqueue.in
+++ b/node/node.d/exim_mailqueue.in
@@ -24,25 +24,26 @@
 #%# capabilities=autoconf
 
 DIRNAME=$(dirname $0)
-SPOOLDIR="unset"
-# You cannot trust the exit status of which
-EXIM=$(which exim 2>/dev/null)
-case $EXIM:$? in
-    *:1|no*) EXIM=$(which exim4 2>/dev/null)
-esac
-case $EXIM:$? in
-    *:1|no*) EXIM=''
-esac
+SPOOLDIR=${spooldir:-unset}
+EXIM=${exim:-unset}
+if [ "$EXIM" = "unset" ]; then
+    # You cannot trust the exit status of which
+    EXIM=$(which exim 2>/dev/null)
+    case $EXIM:$? in
+        *:1|no*) EXIM=$(which exim4 2>/dev/null)
+    esac
+    case $EXIM:$? in
+        *:1|no*) EXIM=''
+    esac
+fi
 
 GRAPHTITLE='Exim Mailqueue'
 
-SPOOLDIR=${spooldir:-unset}
-EXIM=${exim:-unset}
 QUEUEWARN=${queuewarn:-100}
 QUEUECRIT=${queuecrit:-200}
 GRAPHTITLE=${graphtitle:-$GRAPHTITLE}
 
-if [ "$SPOOLDIR" = "unset" ]
+if [ "$SPOOLDIR" = "unset" ] && [ -n "$EXIM" ]
 then
        SPOOLDIR=$( ($EXIM -bP spool_directory | awk '{ print $3 "/input" }') 
2>/dev/null)
 fi
-- 
1.5.5.4




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to