From a32359c76a6005d3a46b8a73aea2d5c9766116dd Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Mon, 9 Oct 2017 12:12:41 +0200 Subject: [PATCH] [mod] wait locally for the dynette cron to have runned during tsig migration --- src/yunohost/dyndns.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/yunohost/dyndns.py b/src/yunohost/dyndns.py index d596e2525..ff6a5d42c 100644 --- a/src/yunohost/dyndns.py +++ b/src/yunohost/dyndns.py @@ -27,6 +27,7 @@ import os import re import json import glob +import time import base64 import errno import requests @@ -315,6 +316,10 @@ def _migrate_from_md5_tsig_to_sha512_tsig(private_key_path, domain, dyn_host): return public_key_path os.system("mv /etc/yunohost/dyndns/*+157* /tmp") + + # sleep to wait for dyndns cache invalidation + time.sleep(180) + return new_key_path.rsplit(".key", 1)[0] + ".private"