diff options
Diffstat (limited to 'scripts/dynamic-dns/vyatta-dynamic-dns.pl')
-rwxr-xr-x | scripts/dynamic-dns/vyatta-dynamic-dns.pl | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/scripts/dynamic-dns/vyatta-dynamic-dns.pl b/scripts/dynamic-dns/vyatta-dynamic-dns.pl index de66c8ed..283c8159 100755 --- a/scripts/dynamic-dns/vyatta-dynamic-dns.pl +++ b/scripts/dynamic-dns/vyatta-dynamic-dns.pl @@ -40,36 +40,42 @@ my $ddclient_config_dir = '/etc/ddclient'; # my %_services_defaults = ( - dyndns => { - protocol => "dyndns2", - }, afraid => { protocol => "freedns" }, + changeip => { + protocol => "changeip" + }, + cloudflare => { + protocol => "cloudflare" + }, dnspark => { protocol => "dnspark" }, dslreports => { protocol => "dslreports1" }, + dyndns => { + protocol => "dyndns2" + }, easydns => { protocol => "easydns" }, namecheap => { protocol => "namecheap" }, - zoneedit => { - protocol => "zoneedit1" - }, - changeip => { - protocol => "changeip" - }, noip => { protocol => "noip" + }, + sitelutions => { + protocol => "sitelutions" + }, + zoneedit => { + protocol => "zoneedit1" } ); -my ($update_dynamicdns, $op_mode_update_dynamicdns, $stop_dynamicdns, $interface, $get_services, $get_default_services, $check_nodes); +my ($update_dynamicdns, $op_mode_update_dynamicdns, $stop_dynamicdns, $interface, $get_services, $get_default_services, $get_protocols, $check_nodes); GetOptions( "update-dynamicdns!" => \$update_dynamicdns, @@ -78,6 +84,7 @@ GetOptions( "interface=s" => \$interface, "get-services!" => \$get_services, "get-default-services!" => \$get_default_services, + "get-protocols!" => \$get_protocols, "check-nodes!" => \$check_nodes ); @@ -94,7 +101,7 @@ dynamicdns_stop() if (defined $stop_dynamicdns); dynamicdns_get_services() if (defined $get_services); dynamicdns_get_default_services() if (defined $get_default_services); - +dynamicdns_get_protocols() if (defined $get_protocols); dynamicdns_check_nodes() if (defined $check_nodes); exit 0; @@ -166,6 +173,14 @@ sub dynamicdns_get_default_services { print "\n"; } +# Return a list of supported protocols +sub dynamicdns_get_protocols { + for my $service (keys %_services_defaults) { + print " $_services_defaults{$service}{'protocol'}"; + } + print "\n"; +} + # Will return a string with default services and set services, useful for CLI completion sub dynamicdns_get_services { my @o_services = keys %_services_defaults; |