X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/blobdiff_plain/f4506ffd957502bc93ed56ed9b49fc65f3e486bb..1e1d5755e3f46a0ff228cd11df8cc3979b2e99a9:/tools/actions/container_manager.py diff --git a/tools/actions/container_manager.py b/tools/actions/container_manager.py index bb3b650..1304b62 100644 --- a/tools/actions/container_manager.py +++ b/tools/actions/container_manager.py @@ -154,6 +154,9 @@ def do_start(args, session): if which("stop"): command = ["stop", "nfcd"] tools.helpers.run.user(args, command, check=False) + elif which("systemctl") and (tools.helpers.run.user(args, ["systemctl", "is-active", "-q", "nfcd"], check=False) == 0): + command = ["systemctl", "stop", "nfcd"] + tools.helpers.run.user(args, command, check=False) # Set permissions set_permissions(args) @@ -195,6 +198,9 @@ def stop(args, quit_session=True): if which("start"): command = ["start", "nfcd"] tools.helpers.run.user(args, command, check=False) + elif which("systemctl") and (tools.helpers.run.user(args, ["systemctl", "is-enabled", "-q", "nfcd"], check=False) == 0): + command = ["systemctl", "start", "nfcd"] + tools.helpers.run.user(args, command, check=False) # Sensors if which("waydroid-sensord"):