Include DOMAIN directly in HOST envvar for update-conf.sh

This commit is contained in:
Disassembler 2020-04-10 17:55:19 +02:00
parent 67f71697fb
commit 4989d2f87f
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499

View File

@ -169,7 +169,6 @@ def update_app_config(app_name=None):
env['VOLUMES_DIR'] = spoc_config.VOLUMES_DIR
env['APPS_DIR'] = spoc_config.APPS_DIR
env['LOG_DIR'] = spoc_config.LOG_DIR
env['DOMAIN'] = host['domain']
env['PORT'] = host['port']
env['EMAIL'] = common['email']
env['GMAPS_API_KEY'] = common['gmaps-api-key']
@ -177,7 +176,7 @@ def update_app_config(app_name=None):
for app_name in app_names:
install_dir = os.path.join(spoc_config.APPS_DIR, app_name, 'install')
script_path = os.path.join(install_dir, 'update-conf.sh')
env['HOST'] = apps[app_name]['host']
env['HOST'] = f'{apps[app_name]["host"]}.{host["domain"]}'
try:
subprocess.run(script_path, cwd=install_dir, env=env)
except: