fixups
This commit is contained in:
@@ -5,7 +5,7 @@ use warnings;
|
|||||||
use Martnet::DDNS;
|
use Martnet::DDNS;
|
||||||
use Regexp::Common qw/net/;
|
use Regexp::Common qw/net/;
|
||||||
use Getopt::Long qw/GetOptions/;
|
use Getopt::Long qw/GetOptions/;
|
||||||
use JSON::PP qw/encode_json true false/;
|
use JSON::PP qw/encode_json/;
|
||||||
|
|
||||||
sub usage {
|
sub usage {
|
||||||
die "Usage: add-foreign <zone.>\n";
|
die "Usage: add-foreign <zone.>\n";
|
||||||
@@ -22,10 +22,6 @@ my $payload = { };
|
|||||||
|
|
||||||
my $txt = encode_json($payload);
|
my $txt = encode_json($payload);
|
||||||
|
|
||||||
if ($edit) {
|
$ddns->add($host, $txt, '_foreign');
|
||||||
$ddns->set($host, $txt, '_foreign');
|
|
||||||
} else {
|
|
||||||
$ddns->add($host, $txt, '_foreign');
|
|
||||||
}
|
|
||||||
|
|
||||||
exit 0;
|
exit 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user