summaryrefslogtreecommitdiff
path: root/templates/service
diff options
context:
space:
mode:
authorkouak <kouak@kouak.org>2015-03-04 23:38:38 +0100
committerkouak <kouak@kouak.org>2015-03-05 10:35:11 +0100
commitaf6f00be213aaa0a74977e58130c8aede7ad2f22 (patch)
tree91685483e8e5d4c43b5889e6cc13212f5f2cd5d4 /templates/service
parent249e7e2b5792ffcc428546192b06b7120d5ccf5b (diff)
downloadvyatta-cfg-system-af6f00be213aaa0a74977e58130c8aede7ad2f22.tar.gz
vyatta-cfg-system-af6f00be213aaa0a74977e58130c8aede7ad2f22.zip
Add flexibility to dynamic dns configuration while preserving backwards compatibility (#507)
Diffstat (limited to 'templates/service')
-rw-r--r--templates/service/dns/dynamic/interface/node.tag/service/node.def22
-rw-r--r--templates/service/dns/dynamic/interface/node.tag/service/node.tag/protocol/node.def3
-rw-r--r--templates/service/dns/dynamic/interface/node.tag/service/node.tag/server/node.def2
3 files changed, 8 insertions, 19 deletions
diff --git a/templates/service/dns/dynamic/interface/node.tag/service/node.def b/templates/service/dns/dynamic/interface/node.tag/service/node.def
index e5190a14..85208d2e 100644
--- a/templates/service/dns/dynamic/interface/node.tag/service/node.def
+++ b/templates/service/dns/dynamic/interface/node.tag/service/node.def
@@ -1,23 +1,9 @@
tag:
help: Service being used for Dynamic DNS [REQUIRED]
type: txt
-syntax:expression: exec "
- service_array=(afraid dnspark dslreports dyndns easydns namecheap noip sitelutions zoneedit)
- service_array_len=${#service_array[*]}
- i=0
- while [ $i -lt $service_array_len ]; do
- if [ \"${service_array[$i]}\" == \"$VAR(@)\" ] ; then
- exit 0
- fi
- let i++
- done
- echo Invalid service [$VAR(@)]
- exit 1 "
-allowed: local -a array ;
- array=(afraid dnspark dslreports dyndns easydns namecheap noip sitelutions zoneedit);
- echo -n ${array[@]}
+val_help: txt; Custom or predefined service
-commit:expression: $VAR(./@/login) != ""; "Set login for service $VAR(./@) to send DDNS updates for interface $VAR(../@)"
-commit:expression: $VAR(./@/password) != ""; "Set password for service $VAR(./@) to send DDNS updates for interface $VAR(../@)"
-commit:expression: $VAR(./@/host-name) != ""; "Set atleast one host-name registered with service $VAR(./@) to send DDNS updates for interface $VAR(../@)"
+allowed:/opt/vyatta/sbin/vyatta-dynamic-dns.pl --interface $VAR(../@) --get-services
+
+commit:expression: exec "/opt/vyatta/sbin/vyatta-dynamic-dns.pl --interface $VAR(../@) --check-nodes"
diff --git a/templates/service/dns/dynamic/interface/node.tag/service/node.tag/protocol/node.def b/templates/service/dns/dynamic/interface/node.tag/service/node.tag/protocol/node.def
new file mode 100644
index 00000000..0c216d8d
--- /dev/null
+++ b/templates/service/dns/dynamic/interface/node.tag/service/node.tag/protocol/node.def
@@ -0,0 +1,3 @@
+help: ddclient protocol to be used for dynamic dns service [REQUIRED FOR CUSTOM SERVICES]
+type: txt
+val_help: <protocol>; ddclient protocol (see ddclient manual)
diff --git a/templates/service/dns/dynamic/interface/node.tag/service/node.tag/server/node.def b/templates/service/dns/dynamic/interface/node.tag/service/node.tag/server/node.def
index 247755a1..b1bb8b87 100644
--- a/templates/service/dns/dynamic/interface/node.tag/service/node.tag/server/node.def
+++ b/templates/service/dns/dynamic/interface/node.tag/service/node.tag/server/node.def
@@ -1,4 +1,4 @@
-help: Server to send DDNS update to (IP address|hostname)
+help: Server to send DDNS update to (IP address|hostname) [REQUIRED FOR SERVICES]
type: txt
val_help: ipv4; IP address of DDNS server
val_help: <hostname>; Hostname of DDNS server