Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Fiat Tux
Munin
Plugins
Commits
5c37d9f1
Commit
5c37d9f1
authored
Apr 10, 2013
by
Luc Didry
Browse files
[Postfwd2] env.path not mandatory anymore
parent
c9632afb
Changes
1
Hide whitespace changes
Inline
Side-by-side
postfwd2
View file @
5c37d9f1
...
...
@@ -17,7 +17,7 @@
[postfwd2]
user root
env.path /usr/local/sbin/postfwd2 #
MANDATORY !
env.path /usr/local/sbin/postfwd2 #
OPTIONAL : look for postfwd2 in /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin, /usr/local/sbin
env.include .*ISBAD #OPTIONAL
env.exclude .*ISGOOD #OPTIONAL
...
...
@@ -159,6 +159,12 @@ foreach my $policy (keys %policies) {
}
##### I have to parse the output BEFORE config, since policy matchs are dependant of the postfwd --dumpstats output
if
(
!
defined
(
$ENV
{
path
}))
{
foreach
my
$path
(
qw{/bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin}
)
{
$ENV
{
path
}
=
$path
.
'
/postfwd2
'
if
(
!
defined
(
$ENV
{
path
})
&&
-
x
$path
.
'
/postfwd2
');
last
if
(
defined
(
$ENV
{
path
}));
}
}
open
(
DATA
,
$ENV
{
path
}
.
'
--dumpstats |
')
or
munin_exit_fail
();
my
$total_requests
;
while
(
defined
(
my
$data
=
<
DATA
>
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment