X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=web%2Fsshow.pl;h=a16da779d0285e22b17b259e40f9a6b66045734b;hb=2679e59589f8338def31c4b7b5c35a365df00d05;hp=32a8306ab94aed68e5fe41fc205c285595dfe719;hpb=fb488538fd6d9413d731491d0283f578a8eeb284;p=nms diff --git a/web/sshow.pl b/web/sshow.pl index 32a8306..a16da77 100755 --- a/web/sshow.pl +++ b/web/sshow.pl @@ -1,4 +1,6 @@ #!/usr/bin/perl +use lib '../include'; +use nms; # # @@ -18,9 +20,7 @@ use DBI; # Grab from .htaccess-authentication my $user = $ENV{'REMOTE_USER'}; -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(); $dbh->{AutoCommit} = 0; my $sgetdone = $dbh->prepare(