SHARE
TWEET

Untitled

a guest Oct 10th, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2. set -e
  3. if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
  4.         update-menus
  5. fi
  6.  
  7. if [ ! -f "/etc/sudoers.d/020_kodi" ]; then
  8. tee -a /etc/sudoers.d/020_kodi > /dev/null 2>&1 <<_EOF_
  9. Cmnd_Alias KODI_VT = /bin/fgconsole, /bin/chvt *
  10.  
  11. %video ALL = (root) NOPASSWD: KODI_VT
  12. _EOF_
  13. fi
  14.  
  15. if [ ! -f "/etc/udev/rules.d/99-kodi.rules" ]; then
  16. tee -a /etc/udev/rules.d/99-kodi.rules > /dev/null 2>&1 <<_EOF_
  17. SUBSYSTEM=="drm", GROUP="video", MODE="0660"
  18. SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0660"
  19. _EOF_
  20. fi
  21.  
  22. if [ ! -f "/etc/polkit-1/localauthority/50-local.d/kodi.pkla" ]; then
  23. tee -a /etc/polkit-1/localauthority/50-local.d/kodi.pkla > /dev/null 2>&1 <<_EOF_
  24. [Allow users in the plugdev group to reboot and shutdown]
  25. Identity=unix-group:plugdev
  26. Action=org.freedesktop.consolekit*;org.freedesktop.upower*;org.freedesktop.login1*
  27. ResultAny=yes
  28. ResultInactive=yes
  29. ResultActive=yes
  30.  
  31. [Allow users in the plugdev group to mount/unmount devices]
  32. Identity=unix-group:plugdev
  33. Action=org.freedesktop.udisks*
  34. ResultAny=yes
  35. ResultInactive=yes
  36. ResultActive=yes
  37. _EOF_
  38. fi
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top