#!/usr/bin/perl use Frontier::Client; my $location = get_location(); # this shouldn't work outside of the house exit unless $location eq "geekhaus"; my $server = Frontier::Client->new( url => 'http://warehaus.geekhaus:8042/RPC2' ); my @args = (); foreach my $arg (@ARGV){ push @args, split(/\s+/, $arg); } $result = $server->call(@args); if( $result ){ print "error: $result\n"; } sub get_location{ my $locfile = "/var/tmp/location"; open LOC, "<$locfile" or die "Cannot open location file: $locfile: $!\n"; my $loc = ; close LOC; chomp $loc; return $loc; }