]> glassweightruler.freedombox.rocks Git - waydroid.git/blobdiff - tools/__init__.py
drivers: Improve binderfs loading
[waydroid.git] / tools / __init__.py
index 555ea00c38ba46b02ce3f83f4b8e6fbe6f3ee2f9..cdb5cdd017192a4c96186e437a8cbb732029ff44 100644 (file)
@@ -36,7 +36,8 @@ def main():
                 print('ERROR: WayDroid is not initialized, run "waydroid init"')
                 return 0
             elif os.geteuid() == 0 and args.action == "init":
                 print('ERROR: WayDroid is not initialized, run "waydroid init"')
                 return 0
             elif os.geteuid() == 0 and args.action == "init":
-                os.mkdir(args.work)
+                if not os.path.exists(args.work):
+                    os.mkdir(args.work)
             else:
                 args.log = "/tmp/tools.log"
 
             else:
                 args.log = "/tmp/tools.log"
 
@@ -63,6 +64,8 @@ def main():
                 actions.container_manager.start(args)
             elif args.subaction == "stop":
                 actions.container_manager.stop(args)
                 actions.container_manager.start(args)
             elif args.subaction == "stop":
                 actions.container_manager.stop(args)
+            if args.subaction == "restart":
+                actions.container_manager.restart(args)
             elif args.subaction == "freeze":
                 actions.container_manager.freeze(args)
             elif args.subaction == "unfreeze":
             elif args.subaction == "freeze":
                 actions.container_manager.freeze(args)
             elif args.subaction == "unfreeze":