mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
lemonconf bugfix
This commit is contained in:
parent
57bf10393a
commit
ebce032ce9
2 changed files with 9 additions and 14 deletions
|
@ -124,9 +124,10 @@ def domain_add(domains, raw=False, main=False):
|
||||||
(('vhostOptions', domain, 'vhostMaintenance'), 0),
|
(('vhostOptions', domain, 'vhostMaintenance'), 0),
|
||||||
(('vhostOptions', domain, 'vhostPort'), -1),
|
(('vhostOptions', domain, 'vhostPort'), -1),
|
||||||
(('vhostOptions', domain, 'vhostHttps'), -1),
|
(('vhostOptions', domain, 'vhostHttps'), -1),
|
||||||
(('locationRules', domain, 'default'), 'accept', apply=True)
|
(('locationRules', domain, 'default'), 'accept')
|
||||||
]
|
]
|
||||||
for lemonrule in lemonrules: tools_lemonrule(*lemonrule)
|
for lemonrule in lemonrules: tools_lemonrule(*lemonrule)
|
||||||
|
tools_lemonrule(apply=True)
|
||||||
_apache_config(domain)
|
_apache_config(domain)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -166,21 +166,15 @@ def tools_maindomain(old_domain, new_domain, dyndns=False):
|
||||||
|
|
||||||
domain_add([new_domain], raw=False, main=True)
|
domain_add([new_domain], raw=False, main=True)
|
||||||
|
|
||||||
lemonrules = [
|
tools_lemonrule('domain', new_domain) # Replace Lemon domain
|
||||||
('domain', new_domain), # Replace Lemon domain
|
tools_lemonrule('ldapBase', 'dc=yunohost,dc=org') # Set ldap basedn
|
||||||
('ldapBase', 'dc=yunohost,dc=org'), # Set ldap basedn
|
tools_lemonrule('portal', 'https://'+ new_domain +'/sso/') # Set SSO url
|
||||||
('portal', 'https://'+ new_domain +'/sso/'), # Set SSO url
|
tools_lemonrule(url=new_domain+'/ynh-admin/', value='$uid eq "admin"')
|
||||||
(url=new_domain+'/ynh-admin/', value='$uid eq "admin"'),
|
tools_lemonrule(url=new_domain+'/ynh-user/', value='$uid ne "admin"')
|
||||||
(url=new_domain+'/ynh-user/', value='$uid ne "admin"')
|
|
||||||
]
|
|
||||||
|
|
||||||
if old_domain is 'yunohost.org':
|
if old_domain is 'yunohost.org':
|
||||||
lemonrules.extend([
|
tools_lemonrule(url=old_domain+'/ynh-admin/', delete=True)
|
||||||
(url=old_domain+'/ynh-admin/', delete=True),
|
tools_lemonrule(url=old_domain+'/ynh-user/', delete=True)
|
||||||
(url=old_domain+'/ynh-user/', delete=True)
|
|
||||||
])
|
|
||||||
|
|
||||||
for lemonrule in lemonrules: tools_lemonrule(*lemonrule)
|
|
||||||
|
|
||||||
os.system('rm /etc/yunohost/apache/domains/' + old_domain + '.d/*.fixed.conf') # remove SSO apache conf dir from old domain conf (fail if postinstall)
|
os.system('rm /etc/yunohost/apache/domains/' + old_domain + '.d/*.fixed.conf') # remove SSO apache conf dir from old domain conf (fail if postinstall)
|
||||||
os.system('rm /etc/ssl/private/yunohost_key.pem')
|
os.system('rm /etc/ssl/private/yunohost_key.pem')
|
||||||
|
|
Loading…
Reference in a new issue