- if not os.path.isfile(args.config):
- if args.action and args.action != "init":
- print('ERROR: WayDroid is not initialized, run "waydroid init"')
- return 0
+ if not actions.initializer.is_initialized(args):
+ if args.action and (args.action != "init" and args.action != "log"):
+ if not args.wait_for_init:
+ print('ERROR: WayDroid is not initialized, run "waydroid init"')
+ return 0
+
+ print('WayDroid waiting for initialization...')
+ while helpers.ipc.listen(channel="init") != "done":
+ pass
+