mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Regenerate configuration files only if YunoHost is postinstalled
This commit is contained in:
parent
bc85d157b5
commit
8c46e978a3
2 changed files with 7 additions and 5 deletions
|
@ -14,7 +14,6 @@ include /etc/ldap/schema/nis.schema
|
|||
include /etc/ldap/schema/inetorgperson.schema
|
||||
include /etc/ldap/schema/mailserver.schema
|
||||
include /etc/ldap/schema/sudo.schema
|
||||
include /etc/ldap/schema/samba.schema
|
||||
|
||||
# Where the pid file is put. The init.d script
|
||||
# will not stop the server if you change this.
|
||||
|
|
|
@ -159,10 +159,13 @@ def domain_add(auth, domain, dyndns=False):
|
|||
if not auth.add('virtualdomain=%s,ou=domains' % domain, attr_dict):
|
||||
raise MoulinetteError(errno.EIO, m18n.n('domain_creation_failed'))
|
||||
|
||||
service_regenconf(service='nginx')
|
||||
service_regenconf(service='metronome')
|
||||
service_regenconf(service='dnsmasq')
|
||||
os.system('yunohost app ssowatconf > /dev/null 2>&1')
|
||||
try:
|
||||
with open('/etc/yunohost/installed', 'r') as f:
|
||||
service_regenconf(service='nginx')
|
||||
service_regenconf(service='metronome')
|
||||
service_regenconf(service='dnsmasq')
|
||||
os.system('yunohost app ssowatconf > /dev/null 2>&1')
|
||||
except IOError: pass
|
||||
except:
|
||||
# Force domain removal silently
|
||||
try: domain_remove(auth, domain, True)
|
||||
|
|
Loading…
Add table
Reference in a new issue