if $phone is not set, take the first account available
This commit is contained in:
parent
57564917f0
commit
2c2f8a1804
1 changed files with 7 additions and 1 deletions
|
|
@ -56,9 +56,15 @@ my $cachedir = $ENV{'HOME'} . '/.config/weboob/munin/';
|
|||
my $cachefile = "$cachedir/freemobile-munin";
|
||||
|
||||
my $refreshtime = $ENV{'cache_expire'} || 10_800;
|
||||
my $phone = $ENV{'phonenumber'};
|
||||
|
||||
my $weboob = '/usr/bin/env weboob-cli -b freemobile ICapBill get_details ' . $phone . '@freemobile -f table';
|
||||
my $phone = $ENV{'phonenumber'};
|
||||
my $account = '';
|
||||
|
||||
if (length($phone) > 0) {
|
||||
$account = $phone . '@freemobile';
|
||||
}
|
||||
|
||||
my $weboob = 'boobill -f table -b freemobile details ' . $account;
|
||||
my $cache_fh;
|
||||
|
||||
my %label = (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue