mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
28 lines
904 B
Text
28 lines
904 B
Text
post_install() {
|
|
update_icons
|
|
getent group xbmc > /dev/null || groupadd -g 420 xbmc
|
|
getent passwd xbmc > /dev/null || 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
|
|
}
|
|
|
|
post_upgrade() {
|
|
post_install $1
|
|
if ! getent group xbmc | cut -d: -f3 | grep 420 > /dev/null 2>&1; then
|
|
groupmod -g 420 xbmc
|
|
fi
|
|
if ! id -u xbmc | grep 420 > /dev/null 2>&1; then
|
|
usermod -u 420 xbmc
|
|
chown -R xbmc:xbmc /var/lib/xbmc
|
|
fi
|
|
}
|
|
|
|
post_remove() {
|
|
update_icons
|
|
getent passwd xbmc > /dev/null 2>&1 && userdel xbmc
|
|
getent group xbmc > /dev/null 2>&1 && groupdel xbmc
|
|
}
|
|
|
|
update_icons() {
|
|
type -p gtk-update-icon-cache > /dev/null 2>&1 && usr/bin/gtk-update-icon-cache -qtf usr/share/icons/hicolor
|
|
type -p update-desktop-database > /dev/null 2>&1 && usr/bin/update-desktop-database -q usr/share/applications
|
|
}
|