summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Mekkering2017-02-26 14:20:42 +0100
committerAlex Mekkering2017-02-26 14:20:42 +0100
commit6719d2e7cdda897fc59993a1c5708b37b6c36021 (patch)
tree00f03785acae54511fd61a63dfc6cf4cf312bbe6
parent408b0651e2f5faf78ddc7dc741a48f89138a0891 (diff)
downloadaur-6719d2e7cdda897fc59993a1c5708b37b6c36021.tar.gz
auto-assign an available UID below 1000 to user hts
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD2
-rw-r--r--tvheadend.install7
3 files changed, 7 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 42649d9130f0..bcb43107c917 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index 742a94b9d46c..c34aee2a6e39 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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