Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jul 2013 06:52:19 +0000 (UTC)
From:      Bernhard Froehlich <decke@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r323811 - in head/multimedia/tvheadend: . files
Message-ID:  <201307280652.r6S6qJLC040901@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: decke
Date: Sun Jul 28 06:52:18 2013
New Revision: 323811
URL: http://svnweb.freebsd.org/changeset/ports/323811

Log:
  - Add rc.d script
  - Bump PORTREVISION

Added:
  head/multimedia/tvheadend/files/tvheadend.in   (contents, props changed)
Modified:
  head/multimedia/tvheadend/Makefile
  head/multimedia/tvheadend/pkg-message

Modified: head/multimedia/tvheadend/Makefile
==============================================================================
--- head/multimedia/tvheadend/Makefile	Sun Jul 28 04:20:32 2013	(r323810)
+++ head/multimedia/tvheadend/Makefile	Sun Jul 28 06:52:18 2013	(r323811)
@@ -3,6 +3,7 @@
 
 PORTNAME=	tvheadend
 PORTVERSION=	3.4.0.20130726.3
+PORTREVISION=	1
 CATEGORIES=	multimedia
 MASTER_SITES=	http://people.freebsd.org/~decke/distfiles/
 DISTFILES=	${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX} dvb-scan-tables-20130714.tar.gz
@@ -28,6 +29,14 @@ USE_PYTHON=	yes
 GNU_CONFIGURE=	yes
 MAKE_JOBS_UNSAFE=	yes
 MAN1=		${PORTNAME}.1
+USE_RC_SUBR=	${PORTNAME}
+
+TVHUSER?=	webcamd
+TVHGROUP?=	webcamd
+USERS=		${TVHUSER}
+GROUPS=		${TVHGROUP}
+SUB_LIST+=	TVHUSER="${TVHUSER}" \
+		TVHGROUP="${TVHGROUP}"
 
 OPTIONS_DEFINE=	AVAHI
 

Added: head/multimedia/tvheadend/files/tvheadend.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/tvheadend/files/tvheadend.in	Sun Jul 28 06:52:18 2013	(r323811)
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: tvheadend
+# REQUIRE: DAEMON webcamd
+# KEYWORD: shutdown
+#
+# Add the following line to /etc/rc.conf[.local] to enable tvheadend
+#
+# tvheadend_enable (bool):	Set to "NO" by default.
+#				Set it to "YES" to enable tvheadend.
+# tvheadend_user (str):		User account to run with.
+# tvheadend_group (str):	Group to run with.
+# tvheadend_flags (str):	Custom flags for tvheadend.
+
+. /etc/rc.subr
+
+: ${tvheadend_enable="NO"}
+: ${tvheadend_user="%%TVHUSER%%"}
+: ${tvheadend_group="%%TVHGROUP%%"}
+
+name=tvheadend
+rcvar=tvheadend_enable
+pidfile="/var/run/${name}.pid"
+confdir="%%PREFIX%%/etc/tvheadend"
+command="%%PREFIX%%/bin/tvheadend"
+command_args="-f -p ${pidfile} -u ${tvheadend_user} -g ${tvheadend_group} -c ${confdir}"
+start_precmd="${name}_prestart"
+
+tvheadend_prestart()
+{
+	if [ ! -f "${pidfile}" ]; then
+		/usr/bin/install -o ${tvheadend_user} -g ${tvheadend_group} -m 644 /dev/null ${pidfile}
+	fi
+	if [ ! -d "${confdir}" ]; then
+		/usr/bin/install -o ${tvheadend_user} -g ${tvheadend_group} -m 755 -d ${confdir}
+	fi
+}
+
+load_rc_config $name
+
+run_rc_command "$1"

Modified: head/multimedia/tvheadend/pkg-message
==============================================================================
--- head/multimedia/tvheadend/pkg-message	Sun Jul 28 04:20:32 2013	(r323810)
+++ head/multimedia/tvheadend/pkg-message	Sun Jul 28 06:52:18 2013	(r323811)
@@ -7,7 +7,12 @@ kill kenny or spill your beer so don't e
 Known issues:
 - no libav support
 - no libdvbcsa support
-- no rc.d script
+
+For the first start in your /etc/rc.conf:
+  tvheadend_enable="YES"
+  tvheadend_flags="-C"
+
+The second line can be removed after the first start.
 
 Patches, feedback and help are always welcome!
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307280652.r6S6qJLC040901>