mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
cyrus-imapd:
First, try to look for proc_path: config parameter. If it doesn't exist, fallback to old method, and extrapolate the configdirectory: config parameter
This commit is contained in:
parent
8537e6fd02
commit
888d91f4e6
1 changed files with 7 additions and 4 deletions
|
@ -66,11 +66,14 @@ GPLv2
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
# IMAP Configuration Directory
|
# IMAP Configuration Directory
|
||||||
CONFIGDIR=$(awk -F : '/^configdirectory:/ { gsub(/ /, "", $2); print $2 }' /etc/imapd.conf 2> /dev/null)
|
PROCDIR=$(awk -F : '/^proc_path:/ { gsub(/ /, "", $2); print $2 }' /etc/imapd.conf 2> /dev/null)
|
||||||
PROCDIR="${CONFIGDIR}/proc"
|
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 [ "$1" = "autoconf" ]; then
|
||||||
if [ "x${CONFIGDIR}x" != "xx" ] && [ -d ${PROCDIR} ]; then
|
if [ "x${PROCDIR}x" != "xx" ] && [ -d ${PROCDIR} ]; then
|
||||||
echo yes
|
echo yes
|
||||||
else
|
else
|
||||||
echo "no (no cyrus-imapd procdir found)"
|
echo "no (no cyrus-imapd procdir found)"
|
||||||
|
@ -79,7 +82,7 @@ if [ "$1" = "autoconf" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if we actually got some sensible data
|
# Check if we actually got some sensible data
|
||||||
if [ "x${CONFIGDIR}x" = "xx" ]; then
|
if [ "x${PROCDIR}x" = "xx" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue