#!/usr/bin/perl -T
# $RedRiver$
########################################################################
# hostalias2filename *** figures out the filename for a wireless
# customer to pass to a script.
#
# 2007.01.10 #*#*# andrew fresh <andrew@mad-techies.org>
########################################################################
use strict;
use warnings;
use Data::Dumper;
%ENV = ();
use Getopt::Long;
my $basedir = '/var/www/wstationinfo';
my $Host;
my $RRD;
#Option checking
my $status = GetOptions(
"host|H=s" => \$Host,
"rrd|r=s" => \$RRD,
);
die "No host passes!" unless $Host
die "No RRD passed!" unless $RRD;
my ($server, $client) = split /-/, $Host, 2;
my $filename = $basedir . '/' . $server . '/' . $Host. '-' . $RRD . '.rrd';
print $filename, "\n";