From 374edc787dfc1ad21ef500c5d6658199029aad66 Mon Sep 17 00:00:00 2001 From: Aaron Dewes Date: Fri, 28 Oct 2022 13:33:25 +0200 Subject: [PATCH] Clean up --- app/app-manager.py | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/app/app-manager.py b/app/app-manager.py index 3fe2b2e..f97c01d 100755 --- a/app/app-manager.py +++ b/app/app-manager.py @@ -85,34 +85,7 @@ elif args.action == 'install': compose(args.app, "pull") compose(args.app, "up --detach") setInstalled(args.app) - registryFile = os.path.join(nodeRoot, "apps", "registry.json") - registry: list = [] - if os.path.isfile(registryFile): - with open(registryFile, 'r') as f: - registry = json.load(f) - for app in registry: - if not app['compatible']: - for dependency in app['missing_dependencies']: - # If dependency is a string, check if it's the app we're installing or the app we're installing implements - if isinstance(dependency, str): - if dependency == args.app or args.app in virtual_apps[dependency]: - # Delete the app's result.yml file - os.remove(os.path.join(nodeRoot, "apps", app['id'], "result.yml")) - # Else, it should be a list, so check if the app we're installing is in it - elif isinstance(dependency, list): - for dep in dependency: - if dep == args.app or args.app in virtual_apps[dep]: - # Delete the app's result.yml file - os.remove(os.path.join(nodeRoot, "apps", app['id'], "result.yml")) - # Reconfigure - os.system(os.path.join(nodeRoot, "scripts", "configure")) - os.chdir(nodeRoot) - os.system("docker compose stop app-tor") - os.system("docker compose start app-tor") - os.system("docker compose stop app-2-tor") - os.system("docker compose start app-2-tor") - os.system("docker compose stop app-3-tor") - os.system("docker compose start app-3-tor") + update(args.verbose) elif args.action == 'uninstall': if not args.app: