mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[enh] add --force to 'dyndns update'
This commit is contained in:
parent
19dbe87167
commit
b8f27b7593
2 changed files with 6 additions and 2 deletions
|
@ -1533,6 +1533,10 @@ dyndns:
|
|||
-i:
|
||||
full: --ipv4
|
||||
help: IP address to send
|
||||
-f:
|
||||
full: --force
|
||||
help: Force the update (for debugging only)
|
||||
action: store_true
|
||||
-6:
|
||||
full: --ipv6
|
||||
help: IPv6 address to send
|
||||
|
|
|
@ -176,7 +176,7 @@ def dyndns_subscribe(operation_logger, subscribe_host="dyndns.yunohost.org", dom
|
|||
|
||||
@is_unit_operation()
|
||||
def dyndns_update(operation_logger, dyn_host="dyndns.yunohost.org", domain=None, key=None,
|
||||
ipv4=None, ipv6=None):
|
||||
ipv4=None, ipv6=None, force=False):
|
||||
"""
|
||||
Update IP on DynDNS platform
|
||||
|
||||
|
@ -249,7 +249,7 @@ def dyndns_update(operation_logger, dyn_host="dyndns.yunohost.org", domain=None,
|
|||
logger.debug("Requested IPv4/v6 are (%s, %s)" % (ipv4, ipv6))
|
||||
|
||||
# no need to update
|
||||
if old_ipv4 == ipv4 and old_ipv6 == ipv6:
|
||||
if not force and (old_ipv4 == ipv4 and old_ipv6 == ipv6):
|
||||
logger.info("No updated needed.")
|
||||
return
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue