-hts-tvheadend (current) hts; urgency=low
+hts-tvheadend (2.1) hts; urgency=low
+ * Add debconf setup scripts to create a superuser account.
+
* HTSP server slightly modified. Now also supports the XBMC HTSP client.
* tvheadend and showtime went separate ways.
* tvheadend: Fix characterset translation bug introduced in r1902.
- -- Andreas Öman <andreas@lonelycoder.com> xxx, xx xxx xxxx xx:xx:xx +xxxx
+ -- Andreas Öman <andreas@lonelycoder.com> Thu, 28 May 2009 21:07:44 +0200
-hts (2.0) unstable; urgency=low
+hts-tvheadend (2.0) unstable; urgency=low
* showtime: New fully customable theme markup language.
-- Andreas Öman <andreas@lonelycoder.com> Thu, 16 Oct 2008 19:47:23 +0200
-hts (1.4) unstable; urgency=low
+hts-tvheadend (1.4) unstable; urgency=low
* tvheadend: Add support for DVB-S (still in experimenal state)
-- Andreas Öman <andreas@lonelycoder.com> Sat, 30 Mar 2008 18:00:00 +0100
-hts (1.3) unstable; urgency=low
+hts-tvheadend (1.3) unstable; urgency=low
* tvheadend: Add support for executing a post processing script after
recording is completed.
-- Andreas Öman <andreas@lonelycoder.com> Thu, 28 Mar 2008 18:00:00 +0100
-hts (1.2) unstable; urgency=low
+hts-tvheadend (1.2) unstable; urgency=low
* Tvheadend has been rewritten from scratch
-- Andreas Öman <andreas@lonelycoder.com> Thu, 28 Feb 2008 17:30:00 +0100
-hts (1.1) unstable; urgency=low
+hts-tvheadend (1.1) unstable; urgency=low
* Bugfix: Tvheadend: Do not crash if event name is NULL
-- Andreas Öman <andreas@lonelycoder.com> Sat, 24 Nov 2007 08:11:00 +0100
-hts (1.0) unstable; urgency=low
+hts-tvheadend (1.0) unstable; urgency=low
* Initial release
-now=`date`
-source=`svn info | grep "URL:" | sed "s/URL: //"`
-rev=`svn info | grep "Revision:" | sed "s/Revision: //"`
-cat <<EOF
-This package was automatically debianized on ${now}
-
-It was downloaded from ${source} revision ${rev}
-
-HTS Showtime and HTS Tvheadend is copyright (c) Andreas Öman 2007
+HTS Tvheadend is copyright (c) Andreas Öman 2006 - 2009
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-
-
-The Debian packaging is (C) 2007, Andreas Öman <andreas@lonelycoder.com> and
-is licensed under the GPL, see "/usr/share/common-licenses/GPL".
-
-EOF
\ No newline at end of file
--- /dev/null
+#!/bin/sh -e
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+# This conf script is capable of backing up
+db_capb backup
+
+STATE=1
+while [ "$STATE" != 0 -a "$STATE" != 4 ]; do
+ case "$STATE" in
+ 1)
+ # Ask for username
+ db_input high hts-tvheadend/admin_username || true
+ ;;
+
+ 2)
+ # Ask for password
+ db_input high hts-tvheadend/admin_password || true
+ ;;
+
+ 3)
+ # Display a final note
+ db_input high hts-tvheadend/webinterface || true
+ ;;
+ esac
+
+ if db_go; then
+ STATE=$(($STATE + 1))
+ else
+ STATE=$(($STATE - 1))
+ fi
+done
+
-#! /bin/sh -e
+#!/bin/sh -e
HTS_USER=hts
configure)
if ! getent passwd $HTS_USER >/dev/null; then
- echo "Creating user: $HTS_USER..."
+ echo >&2 "Creating user: $HTS_USER..."
adduser --quiet --system --group --shell /bin/bash $HTS_USER
fi
+
+ HTS_HOME=`getent passwd $HTS_USER | cut -d':' -f6`
+
+ mkdir -p "${HTS_HOME}/.hts/tvheadend"
+
+ HTS_SUPERUSERCONF="${HTS_HOME}/.hts/tvheadend/superuser"
+ rm -f "${HTS_SUPERUSERCONF}"
+ touch "${HTS_SUPERUSERCONF}"
+ chmod 600 "${HTS_SUPERUSERCONF}"
+
+ echo >>"${HTS_SUPERUSERCONF}" "{"
+
+ if db_get hts-tvheadend/admin_username; then
+ echo >>"${HTS_SUPERUSERCONF}" '"username": "'$RET'",'
+ fi
+
+ if db_get hts-tvheadend/admin_password; then
+ echo >>"${HTS_SUPERUSERCONF}" '"password": "'$RET'"'
+ fi
+
+ echo >>"${HTS_SUPERUSERCONF}" "}"
;;
-*)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 0
- ;;
esac
db_stop
--- /dev/null
+Template: hts-tvheadend/admin_username
+Type: string
+Description: Choose a username for Tvheadend administrator.
+ Tvheadend is accessed via a world reachable web interface (assuming your
+ host is reachable from the internet). To protect from malicious use you
+ must create an initial account to be able to login to Tvheadend.
+ This account can not be changed nor deleted from within Tvheadend itself.
+ If you want to change the superuser account you need to reconfigure the
+ Tvheadend package.
+
+Template: hts-tvheadend/admin_password
+Type: password
+Description: Administrator password.
+
+Template: hts-tvheadend/webinterface
+Type: note
+Description: After installation Tvheadend can be accessed via HTTP on port 9981. From this machine you can point your web-browser to http://localhost:9981/
build: config.mak
- make
+ $(MAKE)
binary:
dh_testdir
dh_installchangelogs
dh_installinit --name tvheadend
dh_installdocs
+ dh_installdebconf
dh_link
dh_strip
dh_compress