mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Remove locationRules for old domain at main domain changing
This commit is contained in:
parent
44ed6c8b4d
commit
b8ebd8986e
1 changed files with 6 additions and 0 deletions
|
@ -121,6 +121,12 @@ def tools_maindomain(old_domain, new_domain):
|
||||||
"$tmp->{'locationRules'}->{'"+ new_domain +"'}->{'(?#0ynh_user)^/ynh-user/'} = '$uid ne \"admin\"';"
|
"$tmp->{'locationRules'}->{'"+ new_domain +"'}->{'(?#0ynh_user)^/ynh-user/'} = '$uid ne \"admin\"';"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if old_domain is not 'yunohost.org':
|
||||||
|
lemon_conf_lines.extend([
|
||||||
|
"$tmp->{'locationRules'}->{'"+ old_domain +"'}->{'(?#0ynh_admin)^/ynh-admin/'} = '';",
|
||||||
|
"$tmp->{'locationRules'}->{'"+ old_domain +"'}->{'(?#0ynh_user)^/ynh-user/'} = '';"
|
||||||
|
])
|
||||||
|
|
||||||
with open(lemon_tmp_conf,'a') as lemon_conf:
|
with open(lemon_tmp_conf,'a') as lemon_conf:
|
||||||
for line in lemon_conf_lines:
|
for line in lemon_conf_lines:
|
||||||
lemon_conf.write(line + '\n')
|
lemon_conf.write(line + '\n')
|
||||||
|
|
Loading…
Add table
Reference in a new issue