2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

Merge pull request #617 from HeisSpiter/master

cyrus-imapd:
This commit is contained in:
Stig Sandbeck Mathisen 2015-05-23 21:12:42 +02:00
commit 4f6929be39

View File

@ -66,11 +66,14 @@ GPLv2
=cut
# IMAP Configuration Directory
CONFIGDIR=$(awk -F : '/^configdirectory:/ { gsub(/ /, "", $2); print $2 }' /etc/imapd.conf 2> /dev/null)
PROCDIR="${CONFIGDIR}/proc"
PROCDIR=$(awk -F : '/^proc_path:/ { gsub(/ /, "", $2); print $2 }' /etc/imapd.conf 2> /dev/null)
if [ "x${PROCDIR}x" = "xx" ]; then
CONFIGDIR=$(awk -F : '/^configdirectory:/ { gsub(/ /, "", $2); print $2 }' /etc/imapd.conf 2> /dev/null)
PROCDIR="${CONFIGDIR}/proc"
fi
if [ "$1" = "autoconf" ]; then
if [ "x${CONFIGDIR}x" != "xx" ] && [ -d ${PROCDIR} ]; then
if [ "x${PROCDIR}x" != "xx" ] && [ -d ${PROCDIR} ]; then
echo yes
else
echo "no (no cyrus-imapd procdir found)"
@ -79,7 +82,7 @@ if [ "$1" = "autoconf" ]; then
fi
# Check if we actually got some sensible data
if [ "x${CONFIGDIR}x" = "xx" ]; then
if [ "x${PROCDIR}x" = "xx" ]; then
exit 1
fi