]> git.sesse.net Git - nms/blobdiff - web/nettkart-web.pl
Use nms::db_connect() everywhere.
[nms] / web / nettkart-web.pl
index 3da5fe554ae92f9373889d5e28dd812ef6ae459a..154181f3814b977de41fc99df35187aaf3eda886 100755 (executable)
@@ -1,10 +1,11 @@
 #! /usr/bin/perl
 use CGI;
 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();
 print $cgi->header(-type=>'text/html', -refresh=>'45; http://nms.tg05.gathering.org/nettkart-web.pl');
 
 print <<"EOF";