blob: 0b6d4ec7b213ada5cee9abe85e7826dc29c0ec45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
HTS_USER=hts
HTS_GROUP=video
post_install() {
if ! getent passwd $HTS_USER &> /dev/null; then
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
cat << 'EOM'
==> All configuration is maintained through the web interface:
==>
==> http://localhost:9981/
==>
==> Default login without username/password.
EOM
}
post_remove() {
userdel $HTS_USER &> /dev/null
echo " ==> User '$HTS_USER' removed"
}
|