From 3ec4d97a54ea72054638fec340bd58819b30ec01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 13 Feb 2020 08:31:23 +0100 Subject: kodi-rpi: rename from kodi and try to improve and clean --- kodi-rpi/60-kodi.rules | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 kodi-rpi/60-kodi.rules (limited to 'kodi-rpi/60-kodi.rules') diff --git a/kodi-rpi/60-kodi.rules b/kodi-rpi/60-kodi.rules new file mode 100644 index 0000000..7023ff7 --- /dev/null +++ b/kodi-rpi/60-kodi.rules @@ -0,0 +1,12 @@ +// DO NOT EDIT THIS FILE, it will be overwritten on update +// +// Allows shutting down the system when using Kodi with a dedicated user + +polkit.addRule(function(action, subject) { + if (( (action.id.indexOf("org.freedesktop.udisks.") == 0) || + (action.id.indexOf("org.freedesktop.upower.") == 0) || + (action.id.indexOf("org.freedesktop.login1.") == 0) ) && + subject.user == "kodi") { + return polkit.Result.YES; + } +}); -- cgit v1.2.3