From 2080f8edd69cdf7eed4bcfb739e68300faf0681f Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Fri, 19 Jan 2024 23:47:46 -0600 Subject: ddclient: T5966: Streamline dynamic dns op-mode configuration Update op-mode for dynamic dns to standardize on `vyos.opmode`. All methods of `op_mode/dns_dynamic.py` are now available in standardized `op_mode/dns.py`. Move op-mode command `update dns dynamic` to `reset dns dynamic` to reflect that it is not an update but a reset of the dynamic dns service. Also, make the help texts more consistent for all op-mode commands for `dns dynamic` and `dns forwarding`. --- op-mode-definitions/dns-dynamic.xml.in | 25 +++++++++++-------------- op-mode-definitions/dns-forwarding.xml.in | 2 +- 2 files changed, 12 insertions(+), 15 deletions(-) (limited to 'op-mode-definitions') diff --git a/op-mode-definitions/dns-dynamic.xml.in b/op-mode-definitions/dns-dynamic.xml.in index 79478f392..45d58e2e8 100644 --- a/op-mode-definitions/dns-dynamic.xml.in +++ b/op-mode-definitions/dns-dynamic.xml.in @@ -4,7 +4,7 @@ - Clear Domain Name System + Clear Domain Name System (DNS) related service state @@ -30,7 +30,7 @@ - Monitor last lines of Domain Name System related services + Monitor last lines of Domain Name System (DNS) related services @@ -51,7 +51,7 @@ - Show log for Domain Name System related services + Show log for Domain Name System (DNS) related services @@ -66,7 +66,7 @@ - Show Domain Name System related information + Show Domain Name System (DNS) related information @@ -78,7 +78,7 @@ Show Dynamic DNS status - sudo ${vyos_op_scripts_dir}/dns_dynamic.py --status + sudo ${vyos_op_scripts_dir}/dns.py show_dynamic_status @@ -90,34 +90,31 @@ - Restart specific Domain Name System related service + Restart specific Domain Name System (DNS) related service Restart Dynamic DNS service - sudo ${vyos_op_scripts_dir}/dns_dynamic.py --update + if cli-shell-api existsActive service dns dynamic; then sudo systemctl restart ddclient.service; else echo "Dynamic DNS not configured"; fi - - - Update data for a service - + - Update Domain Name System related information + Reset Domain Name System (DNS) related service state - Update Dynamic DNS information + Reset Dynamic DNS information - sudo ${vyos_op_scripts_dir}/dns_dynamic.py --update + sudo ${vyos_op_scripts_dir}/dns.py reset_dynamic diff --git a/op-mode-definitions/dns-forwarding.xml.in b/op-mode-definitions/dns-forwarding.xml.in index ebedae6eb..29bfc61cf 100644 --- a/op-mode-definitions/dns-forwarding.xml.in +++ b/op-mode-definitions/dns-forwarding.xml.in @@ -11,7 +11,7 @@ - Monitor last lines of DNS Forwarding + Monitor last lines of DNS Forwarding service journalctl --no-hostname --follow --boot --unit pdns-recursor.service -- cgit v1.2.3