remove debugging; scripts renamed to omit suffix; added a list for vhosts

This commit is contained in:
2016-02-22 09:11:56 -05:00
parent bf580aee06
commit eb7592d206
5 changed files with 18 additions and 3 deletions

19
bin/addvhost Executable file
View File

@ -0,0 +1,19 @@
#!/usr/bin/perl
use strict;
use warnings;
use Martnet::DDNS;
use Regexp::Common qw/net/;
my $host = shift || die "No vhost provided";
my $master = shift || die "No master DNS IP provided";
die "Hostname must end in a dot"
unless ($host =~ /^[a-zA-Z0-9\.]+\.$/);
my $regex = $RE{net}{IPv4} . '|' . $RE{net}{IPv6};
die "Master must be an IPv4 or IPv6 address"
unless ($master =~ /^$regex$/);
my $ddns = Martnet::DDNS->new();
$ddns->addvhost($host, $master);