[freeside-commits] freeside/FS/FS/NetworkMonitoringSystem Torrus_Internal.pm, 1.15, 1.16

Ivan,,, ivan at wavetail.420.am
Wed Mar 2 10:04:58 PST 2011


Update of /home/cvs/cvsroot/freeside/FS/FS/NetworkMonitoringSystem
In directory wavetail.420.am:/tmp/cvs-serv17682

Modified Files:
	Torrus_Internal.pm 
Log Message:
fix freeside-daily w/Torrus :)

Index: Torrus_Internal.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/NetworkMonitoringSystem/Torrus_Internal.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -w -d -r1.15 -r1.16
--- Torrus_Internal.pm	2 Mar 2011 18:00:59 -0000	1.15
+++ Torrus_Internal.pm	2 Mar 2011 18:04:56 -0000	1.16
@@ -11,7 +11,7 @@
 use FS::svc_port;
 use FS::torrus_srvderive;
 use FS::torrus_srvderive_component;
-use Torrus::ConfigTree;
+#use Torrus::ConfigTree;
 
 #$DEBUG = 0;
 #$me = '[FS::NetworkMonitoringSystem::Torrus_Internal]';
@@ -108,6 +108,11 @@
     my @keys = keys %$hash; # yeah this is weird...
     my $host = $keys[0];
     my $iface = $hash->{$keys[0]};
+
+    #Torrus::ConfigTree is only available when running under the web UI
+    eval 'use Torrus::ConfigTree;';
+    die $@ if $@;
+
     my $config_tree = new Torrus::ConfigTree( -TreeName => 'main' );
     my $token = $config_tree->token("/Routers/$host/Interface_Counters/$iface/InOut_bps");
     return $Torrus::Freeside::FSURL."/torrus/main?token=$token";



More information about the freeside-commits mailing list