]> glassweightruler.freedombox.rocks Git - waydroid.git/blobdiff - tools/__init__.py
tools: Fix typo on stop container
[waydroid.git] / tools / __init__.py
index 13a6110b15ec0e266957376a4a5977d22bfb8271..62c2b921aaa11d53bf3eb8b130651aa18ef75377 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":
-                os.mkdir(args.work)
+                if not os.path.exists(args.work):
+                    os.mkdir(args.work)
             else:
                 args.log = "/tmp/tools.log"
 
@@ -63,7 +64,7 @@ def main():
                 actions.container_manager.start(args)
             elif args.subaction == "stop":
                 actions.container_manager.stop(args)
-            if args.subaction == "restart":
+            elif args.subaction == "restart":
                 actions.container_manager.restart(args)
             elif args.subaction == "freeze":
                 actions.container_manager.freeze(args)