Skip ynhapi, do not start tahoe-lafs and change dyndns cron

This commit is contained in:
Kload 2013-11-21 19:08:53 +01:00
parent 8d537a1b6b
commit 5fd90d2b7b
4 changed files with 6 additions and 8 deletions

View file

@ -676,7 +676,7 @@ def app_ssowatconf():
'Email': 'mail' 'Email': 'mail'
}, },
'domains': domains, 'domains': domains,
'skipped_urls': [main_domain +'/ynhadmin'], 'skipped_urls': [main_domain +'/ynhadmin', main_domain +'/ynhapi'],
'unprotected_urls': [], 'unprotected_urls': [],
'users': users 'users': users
} }

View file

@ -50,5 +50,6 @@ def backup_init(helper=False):
try: try:
with open('/etc/yunohost/light') as f: pass with open('/etc/yunohost/light') as f: pass
except IOError: except IOError:
os.system('update-rc.d tahoe-lafs defaults') pass
os.system('service tahoe-lafs restart') #os.system('update-rc.d tahoe-lafs defaults')
#os.system('service tahoe-lafs restart')

View file

@ -146,7 +146,7 @@ def dyndns_installcron():
""" """
os.system("touch /etc/cron.d/yunohost-dyndns") os.system("touch /etc/cron.d/yunohost-dyndns")
os.system("echo '*/30 * * * * root yunohost dyndns update --no-ldap >> /dev/null' >/etc/cron.d/yunohost-dyndns") os.system("echo '*/2 * * * * root yunohost dyndns update --no-ldap >> /dev/null' >/etc/cron.d/yunohost-dyndns")
win_msg(_("DynDNS cron installed")) win_msg(_("DynDNS cron installed"))

View file

@ -31,7 +31,6 @@ 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
@ -185,7 +184,7 @@ def tools_maindomain(old_domain, new_domain, dyndns=False):
with open('/etc/yunohost/light') as f: pass with open('/etc/yunohost/light') as f: pass
except IOError: except IOError:
command_list.append('service amavis restart') command_list.append('service amavis restart')
command_list.append('service tahoe-lafs restart') #command_list.append('service tahoe-lafs restart')
for command in command_list: for command in command_list:
if os.system(command) != 0: if os.system(command) != 0:
@ -198,8 +197,6 @@ 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)
time.sleep(120)
os.system('yunohost dyndns update')
win_msg(_("Main domain has been successfully changed")) win_msg(_("Main domain has been successfully changed"))