mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Wait 2 minutes at postinstall if domain is dynamic
This commit is contained in:
parent
65579bbeb8
commit
17cfe78777
1 changed files with 3 additions and 1 deletions
|
@ -31,6 +31,7 @@ import getpass
|
||||||
import subprocess
|
import subprocess
|
||||||
import requests
|
import requests
|
||||||
import json
|
import json
|
||||||
|
import time
|
||||||
from yunohost import YunoHostError, YunoHostLDAP, validate, colorize, get_required_args, win_msg
|
from yunohost import YunoHostError, YunoHostLDAP, validate, colorize, get_required_args, win_msg
|
||||||
from yunohost_domain import domain_add, domain_list
|
from yunohost_domain import domain_add, domain_list
|
||||||
from yunohost_dyndns import dyndns_subscribe
|
from yunohost_dyndns import dyndns_subscribe
|
||||||
|
@ -193,7 +194,8 @@ def tools_maindomain(old_domain, new_domain, dyndns=False):
|
||||||
dyndomain = '.'.join(new_domain.split('.')[1:])
|
dyndomain = '.'.join(new_domain.split('.')[1:])
|
||||||
if dyndomain in dyndomains:
|
if dyndomain in dyndomains:
|
||||||
dyndns_subscribe(domain=new_domain)
|
dyndns_subscribe(domain=new_domain)
|
||||||
os.system('yunohost dyndns update | at now + 2 minutes')
|
time.sleep(120)
|
||||||
|
os.system('yunohost dyndns update')
|
||||||
|
|
||||||
win_msg(_("Main domain has been successfully changed"))
|
win_msg(_("Main domain has been successfully changed"))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue