X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=web%2Fstempmap-ptn.pl;h=a1fc55af3b441d89b4a7502d52d66d2c7aa624a4;hb=065361daac62b4cdb33cf19caa534e29ac1dfde0;hp=3522b514142590078ca8495dc5246b2f95da46c5;hpb=d6cfbb682b3492d24b6623fbf1345c5b2b95f230;p=nms diff --git a/web/stempmap-ptn.pl b/web/stempmap-ptn.pl index 3522b51..a1fc55a 100755 --- a/web/stempmap-ptn.pl +++ b/web/stempmap-ptn.pl @@ -1,4 +1,6 @@ #!/usr/bin/perl +use lib '../include'; +use nms; # # @@ -11,8 +13,7 @@ use warnings; my $img = GD::Image->new('stemp-bg5.png'); 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 $black = $img->colorAllocate(0,0,0); my $white = $img->colorAllocate(255,255,255);