]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Update debian packaging
authorAndreas Öman <andreas@lonelycoder.com>
Mon, 25 May 2009 19:40:14 +0000 (19:40 +0000)
committerAndreas Öman <andreas@lonelycoder.com>
Mon, 25 May 2009 19:40:14 +0000 (19:40 +0000)
debian/hts-tvheadend.init [moved from debian/hts-tvheadend.tvheadend.init with 98% similarity]
debian/hts-tvheadend.postinst [new file with mode: 0644]

similarity index 98%
rename from debian/hts-tvheadend.tvheadend.init
rename to debian/hts-tvheadend.init
index 4a96f4bc30c531664a47252897f8107353861ea8..dd3fc57559b4186354aa4d730edbdd69ac5fb85c 100644 (file)
@@ -16,7 +16,7 @@ PATH=/usr/sbin:/usr/bin:/sbin:/bin
 DESC="HTS Tvheadend"
 NAME=tvheadend
 DAEMON=/usr/bin/$NAME
-DAEMON_ARGS="-f"
+DAEMON_ARGS="-f -u hts -g video"
 PIDFILE=/var/run/$NAME.pid
 SCRIPTNAME=/etc/init.d/$NAME
 
diff --git a/debian/hts-tvheadend.postinst b/debian/hts-tvheadend.postinst
new file mode 100644 (file)
index 0000000..6324fcc
--- /dev/null
@@ -0,0 +1,26 @@
+#! /bin/sh -e
+
+HTS_USER=hts
+
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+case "$1" in
+configure)
+
+   if ! getent passwd $HTS_USER >/dev/null; then
+        echo "Creating user: $HTS_USER..."
+        adduser --quiet --system --group --shell /bin/bash $HTS_USER
+   fi
+   ;;
+*)
+    echo "postinst called with unknown argument \`$1'" >&2
+    exit 0
+    ;;
+esac
+
+db_stop
+
+#DEBHELPER#
+
+exit 0