diff options
author | Alex Mekkering | 2017-02-26 14:20:42 +0100 |
---|---|---|
committer | Alex Mekkering | 2017-02-26 14:20:42 +0100 |
commit | 6719d2e7cdda897fc59993a1c5708b37b6c36021 (patch) | |
tree | 00f03785acae54511fd61a63dfc6cf4cf312bbe6 | |
parent | 408b0651e2f5faf78ddc7dc741a48f89138a0891 (diff) | |
download | aur-6719d2e7cdda897fc59993a1c5708b37b6c36021.tar.gz |
auto-assign an available UID below 1000 to user hts
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 2 | ||||
-rw-r--r-- | tvheadend.install | 7 |
3 files changed, 7 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = tvheadend pkgdesc = TV streaming server for Linux pkgver = 4.0.9 - pkgrel = 3 + pkgrel = 4 url = https://tvheadend.org/projects/tvheadend install = tvheadend.install arch = i686 @@ -4,7 +4,7 @@ pkgname=tvheadend pkgver=4.0.9 -pkgrel=3 +pkgrel=4 pkgdesc="TV streaming server for Linux" arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64') url="https://tvheadend.org/projects/tvheadend" diff --git a/tvheadend.install b/tvheadend.install index f2446007e519..0b6d4ec7b213 100644 --- a/tvheadend.install +++ b/tvheadend.install @@ -1,11 +1,14 @@ HTS_USER=hts -HTS_UID=1337 HTS_GROUP=video post_install() { if ! getent passwd $HTS_USER &> /dev/null; then - useradd -u $HTS_UID -g $HTS_GROUP -m -s /bin/false $HTS_USER &> /dev/null + useradd -r -g $HTS_GROUP -m -s /bin/false $HTS_USER &> /dev/null passwd -l $HTS_USER &> /dev/null + + # make sure residual folders/files are owned by the new user + chown -R $HTS_USER:$HTS_GROUP /home/hts &> /dev/null + echo " ==> User '$HTS_USER' created" fi |