X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/blobdiff_plain/cf1657451ca42d00769b622e2fa57c2b2f08a0f8..d73a47f79abba34c5cfb224a8672a7e1cbfd03e5:/tools/actions/container_manager.py diff --git a/tools/actions/container_manager.py b/tools/actions/container_manager.py index bef7483..24e410b 100644 --- a/tools/actions/container_manager.py +++ b/tools/actions/container_manager.py @@ -122,8 +122,9 @@ def start(args): tools.helpers.run.user(args, command, check=False) # Sensors - tools.helpers.run.user( - args, ["waydroid-sensord", "/dev/" + args.HWBINDER_DRIVER], output="background") + if which("waydroid-sensord"): + tools.helpers.run.user( + args, ["waydroid-sensord", "/dev/" + args.HWBINDER_DRIVER], output="background") # Mount rootfs helpers.images.mount_rootfs(args, cfg["waydroid"]["images_path"]) @@ -207,6 +208,12 @@ def stop(args): command = ["kill", "-9", pid] tools.helpers.run.user(args, command, check=False) + # Umount rootfs + helpers.images.umount_rootfs(args) + + # Umount data + helpers.mount.umount_all(args, tools.config.defaults["data"]) + else: logging.error("WayDroid container is {}".format(status))