https://www.lonelycoder.com/redmine/projects/tvheadend/
Note:
- - a default user has been created to log in the web configuration
- GUI: admin/admin; you can change it at your discretion at runtime.
+ - on first run, tvheadend will start in wizard mode; the webUI
+ is available on port 9981.
- if you want Avahi support, you'll need to enable:
Avahi, D-Bus, libdaemon
[ -z "${TVH_HTSP_PORT}" ] || ARGS="${ARGS} -e ${TVH_HTSP_PORT}"
[ "${TVH_DEBUG}" = "1" ] && ARGS="${ARGS} -s"
+# If first run, start in wizard mode
+if [ -z "$(ls -1 /home/tvheadend/.hts/tvheadend/accesscontrol/ 2>/dev/null)" ]; then
+ ARGS="${ARGS} -C"
+fi
+
case "$1" in
start)
printf "Starting TVHeadend daemon: "
#----------------------------------------------------------------------------
# To run tvheadend, we need:
# - a startup script, and its config file
-# - a default DB with a tvheadend admin
-# - a non-root user to run as
-define TVHEADEND_INSTALL_DB
- $(INSTALL) -D -m 0600 package/tvheadend/accesscontrol.1 \
- $(TARGET_DIR)/home/tvheadend/.hts/tvheadend/accesscontrol/1
- chmod -R go-rwx $(TARGET_DIR)/home/tvheadend
-endef
-TVHEADEND_POST_INSTALL_TARGET_HOOKS += TVHEADEND_INSTALL_DB
+# - a non-root user to run as, and a home for it that is not accessible
+# to the other users (because there will be crendentials in there)
define TVHEADEND_INSTALL_INIT_SYSV
$(INSTALL) -D package/tvheadend/etc.default.tvheadend $(TARGET_DIR)/etc/default/tvheadend
define TVHEADEND_USERS
tvheadend -1 tvheadend -1 * /home/tvheadend - video TVHeadend daemon
endef
+define TVHEADEND_PERMISSIONS
+ /home/tvheadend r 0700 tvheadend tvheadend - - - - -
+endef
$(eval $(generic-package))