Skip to content
Snippets Groups Projects
Commit 51aa7a00 authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Update MS_SERVER_NAME only when changing msuser instance domain.

parent d020dcf1
No related branches found
No related tags found
No related merge requests found
......@@ -65,6 +65,7 @@ class SetAppDomain():
if args:
app = args.pop()
# Get Nginx conf path and instance user
key = None
instance = None
if app == 'cm':
nginx_conf = '/etc/nginx/sites-available/skyreach.conf'
......@@ -81,7 +82,8 @@ class SetAppDomain():
else:
instance = 'msuser'
nginx_conf = '/etc/nginx/sites-available/mediaserver-%s.conf' % instance
key = 'MS_SERVER_NAME'
if instance == 'msuser':
key = 'MS_SERVER_NAME'
else:
log('Invalid app name requested.')
log(self.USAGE)
......@@ -89,7 +91,8 @@ class SetAppDomain():
# Change domain
self.change_nginx_domain(nginx_conf, new_domain)
self.change_hosts_file(new_domain)
self.change_envsetup_conf(key, new_domain)
if key:
self.change_envsetup_conf(key, new_domain)
if app == 'cm':
warning = self.change_cm_domain(new_domain)
elif app == 'mon':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment