]> git.sesse.net Git - nms/blobdiff - web/overlay.pl
Update make-switches.pl for TG07.
[nms] / web / overlay.pl
index 21eff198badc0f7778cb3e0f0c33b75e80ed4ecd..3265b070e7b6e71be10f36fe327c28631ecf28bb 100755 (executable)
@@ -3,10 +3,11 @@ use GD;
 use LWP::Simple;
 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();
 
 my $cam = $cgi->param('cam');
 if (!defined($cam) || ($cam ne "1" && $cam ne "2")) {
@@ -145,7 +146,7 @@ for my $y (0..479) {
 }
 
 
-print CGI::header(-type=>'image/png', -refresh=>'10; http://nms.tg05.gathering.org/overlay.pl?cam=' . $cam);
+print CGI::header(-type=>'image/png', -refresh=>'10; http://nms.tg07.gathering.org/overlay.pl?cam=' . $cam);
 print $gd->png;
 
 sub get_color {