]> git.sesse.net Git - nms/blobdiff - web/nettkart.pl
Use nms::db_connect() everywhere.
[nms] / web / nettkart.pl
index ac88162ece03f73fa2728e94fc86fc0a164d14bb..29499fb296228c1195a56b4ff5334955dd9955bc 100755 (executable)
@@ -2,10 +2,11 @@
 use CGI;
 use GD;
 use DBI;
+use lib '../include';
+use nms;
 my $cgi = CGI->new;
 
-my $dbh = DBI->connect("dbi:Pg:dbname=snmpfetch;host=violet.tg05.gathering.org", "snmpfetch", "removed")
-        or die "Couldn't connect to database";
+my $dbh = nms::db_connect();
 
 GD::Image->trueColor(1);
 $img = GD::Image->new('snmp-bg.png');