summaryrefslogtreecommitdiff
path: root/pcr/kodi-standalone-service/readme.install
diff options
context:
space:
mode:
authorAndreas Grapentin <andreas@grapentin.org>2018-01-22 09:08:59 +0100
committerAndreas Grapentin <andreas@grapentin.org>2018-01-22 09:08:59 +0100
commit052a047ba2443f21bd93a717fcf9001ca1b87497 (patch)
tree6eddf3488f24459aa4e071e14125d7616c94e1ac /pcr/kodi-standalone-service/readme.install
parent4fddf4535622c1ee143d99ef9e5b41ae67e92f06 (diff)
downloadabslibre-052a047ba2443f21bd93a717fcf9001ca1b87497.tar.gz
abslibre-052a047ba2443f21bd93a717fcf9001ca1b87497.tar.bz2
abslibre-052a047ba2443f21bd93a717fcf9001ca1b87497.zip
pcr/kodi-standalone-service: updated to 1.93
Diffstat (limited to 'pcr/kodi-standalone-service/readme.install')
-rw-r--r--pcr/kodi-standalone-service/readme.install53
1 files changed, 29 insertions, 24 deletions
diff --git a/pcr/kodi-standalone-service/readme.install b/pcr/kodi-standalone-service/readme.install
index 0f5edbec0..3fe317b88 100644
--- a/pcr/kodi-standalone-service/readme.install
+++ b/pcr/kodi-standalone-service/readme.install
@@ -1,37 +1,42 @@
post_install() {
- getent group xbmc > /dev/null || groupadd -g 420 xbmc
- if ! getent passwd xbmc > /dev/null; then
- useradd -c 'XBMC user' -u 420 -g xbmc -G audio,video,network,optical -d /var/lib/xbmc -s /sbin/nologin xbmc
- passwd -l xbmc > /dev/null
+ getent group kodi > /dev/null || groupadd -g 420 kodi
+ if ! getent passwd kodi > /dev/null; then
+ useradd -c 'kodi user' -u 420 -g kodi -G audio,video,network,optical \
+ -d /var/lib/kodi -s /usr/bin/nologin kodi
+ passwd -l kodi > /dev/null
+ [[ ! -d /var/lib/kodi/.kodi ]] &&
+ mkdir /var/lib/kodi/.kodi &&
+ chown -R kodi:kodi /var/lib/kodi/.kodi
fi
+
+ echo "==> Some drivers including Xorg's native modesetting may require the addition"
+ echo "==> of /etc/X11/Xwrapper.config for X to initialize. If kodi.service fails to"
+ echo "==> start, create that file containing the following single line:"
+ echo "==> needs_root_rights = yes"
+ echo "==> See: https://wiki.archlinux.org/index.php/Xorg#Rootless_Xorg_.28v1.16.29"
}
post_upgrade() {
post_install $1
- if ! getent group xbmc | cut -d: -f3 | grep 420 > /dev/null 2>&1; then
- groupmod -g 420 xbmc > /dev/null 2>&1
+ if ! getent group kodi | cut -d: -f3 | grep 420 > /dev/null 2>&1; then
+ groupmod -g 420 kodi > /dev/null 2>&1
fi
- if ! id -u xbmc | grep 420 > /dev/null 2>&1; then
- usermod -u 420 xbmc > /dev/null 2>&1
- if [[ $? -ne 0 ]]; then
- echo "Changing uid of user xbmc failed"
- echo "It is recommended that the uid is changed."
- echo "Stop all processes running under the xbmc user and reinstall xbmc"
- echo "or change the uid manually. (usermod -u 420 xbmc)"
- fi
- chown -R xbmc:xbmc /var/lib/xbmc
+ if ! id -u kodi | grep 420 > /dev/null 2>&1; then
+ usermod -u 420 kodi > /dev/null 2>&1
+ if [[ $? -ne 0 ]]; then
+ echo "==> Changing uid of user kodi failed."
+ echo "==> It is recommended that the uid is changed."
+ echo "==> Stop all processes running under the kodi user and reinstall kodi"
+ echo "==> or change the uid manually. (usermod -u 420 kodi)"
+ fi
+ chown -R kodi:kodi /var/lib/kodi
fi
}
post_remove() {
- getent passwd xbmc > /dev/null 2>&1 && userdel xbmc
- getent group xbmc > /dev/null 2>&1 && groupdel xbmc
+ echo "==> Delete the kodi user if you are certain no processes are running under it."
+ echo "==> userdel kodi"
+ echo "==> groupdel kodi"
}
-post_message() {
- echo "To autostart xbmc standalone, you must create or modify"
- echo "/etc/X11/Xwrapper.config to contain the following 2 lines:"
- echo
- echo "allowed_users = anybody"
- echo "needs_root_rights = yes"
-}
+# vim:set ts=2 sw=2 et: