Ignore all errors and exceptions raised by update-conf.sh

This commit is contained in:
Disassembler 2020-04-10 14:07:41 +02:00
parent 2d788eb704
commit 67f71697fb
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
2 changed files with 7 additions and 6 deletions

View File

@ -173,14 +173,15 @@ def update_app_config(app_name=None):
env['PORT'] = host['port']
env['EMAIL'] = common['email']
env['GMAPS_API_KEY'] = common['gmaps-api-key']
app_names = [app_name] if app_name else repo_local.get_apps()
app_names = [app_name] if app_name else repo_local.get_apps().keys()
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')
if os.path.exists(script_path):
app_env = env.copy()
app_env['HOST'] = apps[app_name]['host']
subprocess.run(script_path, cwd=install_dir, env=app_env)
env['HOST'] = apps[app_name]['host']
try:
subprocess.run(script_path, cwd=install_dir, env=env)
except:
pass
def is_app_started(app_name):
# Assume that the main container has always the same name as the app

View File

@ -8,7 +8,7 @@ from math import floor
from pkg_resources import parse_version
from spoc import repo_online, repo_local
from werkzeug.exceptions import HTTPException, NotFound, Unauthorized
from werkzeug.routing import Map, Rule, RequestRedirect
from werkzeug.routing import Map, Rule
from werkzeug.utils import redirect
from werkzeug.wrappers import Request, Response