mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
dyndns: Don't try to push anything if no ipv4/ipv6
This commit is contained in:
parent
7fd76a6884
commit
69c756918f
1 changed files with 4 additions and 4 deletions
|
@ -228,10 +228,6 @@ def dyndns_update(
|
|||
|
||||
from yunohost.dns import _build_dns_conf
|
||||
|
||||
# Get old ipv4/v6
|
||||
|
||||
old_ipv4, old_ipv6 = (None, None) # (default values)
|
||||
|
||||
# If domain is not given, try to guess it from keys available...
|
||||
if domain is None:
|
||||
(domain, key) = _guess_current_dyndns_domain(dyn_host)
|
||||
|
@ -311,6 +307,10 @@ def dyndns_update(
|
|||
logger.debug("Old IPv4/v6 are (%s, %s)" % (old_ipv4, old_ipv6))
|
||||
logger.debug("Requested IPv4/v6 are (%s, %s)" % (ipv4, ipv6))
|
||||
|
||||
if ipv4 is None and ipv6 is None:
|
||||
logger.debug("No ipv4 nor ipv6 ?! Sounds like the server is not connected to the internet, or the ip.yunohost.org infrastructure is down somehow")
|
||||
return
|
||||
|
||||
# no need to update
|
||||
if (not force and not dry_run) and (old_ipv4 == ipv4 and old_ipv6 == ipv6):
|
||||
logger.info("No updated needed.")
|
||||
|
|
Loading…
Add table
Reference in a new issue