summaryrefslogtreecommitdiff
path: root/kodi-rpi/60-kodi.rules
diff options
context:
space:
mode:
Diffstat (limited to 'kodi-rpi/60-kodi.rules')
-rw-r--r--kodi-rpi/60-kodi.rules12
1 files changed, 12 insertions, 0 deletions
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;
+ }
+});