From 90bcdf105488fa185b0f263ca419603b1ef47c0d Mon Sep 17 00:00:00 2001 From: Florent Date: Wed, 28 Mar 2012 15:05:40 +0200 Subject: [PATCH] Fix condition to detect empty output And remove some whitespace --- contrib/freemobile-munin | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/freemobile-munin b/contrib/freemobile-munin index 6e1101d4..a7cf812f 100755 --- a/contrib/freemobile-munin +++ b/contrib/freemobile-munin @@ -26,14 +26,14 @@ C I: user with freemobile backend configured C I: path to user home C (optional): default only 'voice sms' -The full list of monitored options is : - * voice sms mms data specialvoice voicetoint voiceint smsint mmsint dataint +The full list of monitored options is : + * voice sms mms data specialvoice voicetoint voiceint smsint mmsint dataint -C (optional): cache interval in second, or time +C (optional): cache interval in second, or time between two connection to the website. The cache interval is 3 hours by default. -C (optional): Munin internal option. The plugin can be slow, -30s is recommended. +C (optional): Munin internal option. The plugin can be slow, +30s is recommended. =head1 LICENSE @@ -163,7 +163,7 @@ sub fetch { my @lines = <$data>; close $data or carp "unable to close: $ERRNO"; # If error output, print the cache (if exist) and exit - if ( @cache_data > 0 ) { + if ( @lines == 0 ) { if ( @cache_data > 0 ) { print join q{}, @cache_data[ 1 .. $#cache_data ]; exit 0;