diff --git a/contrib/freemobile-munin b/contrib/freemobile-munin index 0dc16ed4..550a8b07 100755 --- a/contrib/freemobile-munin +++ b/contrib/freemobile-munin @@ -110,6 +110,7 @@ if ($ARGV[0] and $ARGV[0] eq "config") { } } else { + my $refresh; my $first = 1; my $time = time(); # Check if cache exist and not older than 3 hours @@ -118,9 +119,12 @@ else { LOOP: while() { if ($first) { if ($time - $_ > $refreshtime) { - $cache = 0; + $refresh = 0; last; } + else { + $refresh = 1; + } $first = 0; } else { @@ -129,7 +133,7 @@ else { } } close(CACHE); - exit if $cache; + exit if $cache and $refresh; # Open cache for writing and execute weboob open(CACHE, "> " . $cachefile) or die "Failed to open file $cachefile";