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)
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"):