]> glassweightruler.freedombox.rocks Git - waydroid.git/blobdiff - tools/__init__.py
lxc: Enable vndk lite for mainline devices
[waydroid.git] / tools / __init__.py
index 555ea00c38ba46b02ce3f83f4b8e6fbe6f3ee2f9..9bf1b7eeb9dc02b15f1349e2cf22f6f0df41c6bd 100644 (file)
@@ -27,7 +27,7 @@ def main():
         args.cache = {}
         args.work = config.defaults["work"]
         args.config = args.work + "/waydroid.cfg"
-        args.log = args.work + "/tools.log"
+        args.log = args.work + "/waydroid.log"
         args.sudo_timer = True
         args.timeout = 1800
 
@@ -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,6 +64,8 @@ def main():
                 actions.container_manager.start(args)
             elif args.subaction == "stop":
                 actions.container_manager.stop(args)
+            elif args.subaction == "restart":
+                actions.container_manager.restart(args)
             elif args.subaction == "freeze":
                 actions.container_manager.freeze(args)
             elif args.subaction == "unfreeze":