1 2 3
f=/etc/tvheadend/superuser [ -s $f ] || printf '{ "username": "tvheadend", "password": "%s" }' $(pwgen 12 1) > $f /usr/sbin/post_service tvheadend
/usr/sbin/groupadd -r -f _hts &> /dev/null /usr/sbin/useradd -r -g _hts -G radio,video -d /var/lib/tvheadend \ -s /dev/null -c 'Tvheadend pseudouser' -n _hts &> /dev/null ||:
1
/usr/sbin/preun_service tvheadend