Skip to content

Commit

Permalink
Fix configuration file loading
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierBerger committed Jan 3, 2015
1 parent e868781 commit a66121b
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions rpimonitor/rpimonitord
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,14 @@ sub Load
$_ = abs_path($0);
my ($path,$file) = /(.*)\/([^\/]*)$/;

=cut
if ( scalar(@{$this->{'daemon'}->{'confFiles'}}) == 0 ) {
@{$this->{'daemon'}->{'confFiles'}} = ( @{$this->{'daemon'}->{'confFiles'}}, glob "/etc/rpimonitor/*.conf" ) ;
}
push(@{$this->{'daemon'}->{'confFiles'}},"/etc/rpimonitor/data.conf");
push(@{$this->{'daemon'}->{'confFiles'}},"/etc/rpimonitor/daemon.conf");

foreach ( @{$this->{'daemon'}->{'confFiles'}} ) {
#print "$_\n";
$this->LoadFile($_);
}
delete($this->{'daemon'}->{'confFiles'});
=cut

$this->LoadFile("/etc/rpimonitor/daemon.conf");
$this->LoadFile("/etc/rpimonitor/data.conf");

# Set version (used by web pagescache mechanism)
$this->{'version'} = localtime();
Expand Down

0 comments on commit a66121b

Please sign in to comment.