diff options
author | root <root@frank.tg14.gathering.org> | 2014-04-15 00:10:09 +0200 |
---|---|---|
committer | root <root@frank.tg14.gathering.org> | 2014-04-15 00:10:09 +0200 |
commit | 607fad328dc97dd02f18db12dcb6c6dde4c7d6fb (patch) | |
tree | d576f4a976cfd60e67ba1978e002d2b60a395830 | |
parent | edf04a90f14ab7635dc29443020f52a4824f77fa (diff) |
mod_perlify dhcpkart.pl
-rwxr-xr-x | web/nms.gathering.org/dhcpkart.pl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/web/nms.gathering.org/dhcpkart.pl b/web/nms.gathering.org/dhcpkart.pl index bd58d50..50abb60 100755 --- a/web/nms.gathering.org/dhcpkart.pl +++ b/web/nms.gathering.org/dhcpkart.pl @@ -4,7 +4,9 @@ use GD; use DBI; use lib '../../include'; use nms; +use File::Basename; my $cgi = CGI->new; +my $cwd = dirname($0); #my $greentimeout = 7200; my $greentimeout = 15*60; @@ -13,7 +15,7 @@ my $maxtimeout = $greentimeout*9; my $dbh = nms::db_connect(); GD::Image->trueColor(1); -my $map = 'tg14-salkart.png'; +my $map = "$cwd/tg14-salkart.png"; die "$map does not exist" unless -e $map; $img = GD::Image->new($map); |