mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
replace hard-coded paths (e.g. '/var/lib/munin/plugin-state') with '$MUNIN_PLUGSTATE'
see http://guide.munin-monitoring.org/en/latest/plugin/env.html
This commit is contained in:
parent
a2b340a791
commit
4b2fcbf8b9
42 changed files with 45 additions and 51 deletions
|
@ -25,7 +25,7 @@
|
|||
# Configuration
|
||||
#
|
||||
|
||||
STAT_FILE=${STAT_FILE:-/var/lib/munin/plugin-state/plugin-plcyd-spf-python.state}
|
||||
STAT_FILE=${STAT_FILE:-$MUNIN_PLUGSTATE/plugin-plcyd-spf-python.state}
|
||||
LOGFILE=${logfile:-/var/log/mail.log}
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
|
|
|
@ -39,7 +39,7 @@ fi
|
|||
LOGDIR=${logdir:-/var/log/mail}
|
||||
MAIL_LOG=$LOGDIR/${logfile:-info}
|
||||
LOGTAIL=${logtail:-`which logtail`}
|
||||
STATEFILE=/var/lib/munin/plugin-state/postfix_mailfiltered.offset
|
||||
STATEFILE=$MUNIN_PLUGSTATE/postfix_mailfiltered.offset
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
if [ -f "${MAIL_LOG}" -a -n "${LOGTAIL}" -a -x "${LOGTAIL}" ] ; then
|
||||
|
|
|
@ -35,7 +35,7 @@ export POLICY
|
|||
LOGDIR=${logdir:-/var/log/mail}
|
||||
MAIL_LOG=$LOGDIR/${logfile:-info}
|
||||
LOGTAIL=${logtail:-`which logtail`}
|
||||
STATEFILE=/var/lib/munin/plugin-state/postfix_mailfiltered_test.offset
|
||||
STATEFILE=$MUNIN_PLUGSTATE/postfix_mailfiltered_test.offset
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
if [ -f "${MAIL_LOG}" -a -n "${LOGTAIL}" -a -x "${LOGTAIL}" ] ; then
|
||||
|
|
|
@ -15,7 +15,7 @@ mktemp -t
|
|||
|
||||
MAIL_LOG=${logfile:-/var/log/mail.log}
|
||||
LOGTAIL=${logtail:-`which logtail`}
|
||||
STATEFILE=/var/lib/munin/plugin-state/postfix_mailfiltered.offset
|
||||
STATEFILE=$MUNIN_PLUGSTATE/postfix_mailfiltered.offset
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
if [ -f "${MAIL_LOG}" -a -n "${LOGTAIL}" -a -x "${LOGTAIL}" ] ; then
|
||||
|
|
|
@ -14,7 +14,7 @@ mktemp -t
|
|||
}
|
||||
|
||||
MAIL_LOG=${logfile:-/var/log/mail.log}
|
||||
STATEFILE=/var/lib/munin/plugin-state/postgrey.offset
|
||||
STATEFILE=$MUNIN_PLUGSTATE/postgrey.offset
|
||||
LOGTAIL=${logtail:-`which logtail`}
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
|
|
|
@ -29,7 +29,7 @@ use strict;
|
|||
use warnings;
|
||||
|
||||
my $maillog= $ENV{'logfile'} || "/var/log/mail.log";
|
||||
my $statefile= $ENV{'statefile'} || "/var/lib/munin/plugin-state/postgrey-new.state";
|
||||
my $statefile= $ENV{'statefile'} || "$ENV{MUNIN_PLUGSTATE}/postgrey-new.state";
|
||||
|
||||
my $greylisted=0;
|
||||
my $greylisted_old=0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue