1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 14:16:00 +00:00

Bugfix : force lockfile removal if the cache is really too old

This commit is contained in:
Luc Didry 2012-05-21 11:35:33 +02:00
parent b6f9a54af7
commit a2b3e009af

View file

@ -159,8 +159,20 @@ sub cache_is_too_old {
} ## cache_is_too_old } ## cache_is_too_old
sub du_not_running { sub du_not_running {
return 0 if (-e $LOCKFILE); if (-e $LOCKFILE) {
return 1; my ($time) = `cat $TIMEFILE`;
chomp $time;
if ( (time - $time) > ($ENV{interval}*60*60) ) {
# The cache is really old (60xinterval) => Maybe the lockfile wasn't properly deleted.
# Let's delete it.
system("rm $LOCKFILE;");
return 1;
} else {
return 0;
}
} else {
return 1;
}
} }
sub munin_exit_done { sub munin_exit_done {