source: build-files/ports-overlay/multimedia/mythtv/files/mythbackend.in @ 1e102bd

9.2-releasereleng/10.0releng/10.0.1
Last change on this file since 1e102bd was 1e102bd, checked in by Kris Moore <kris@…>, 6 months ago

Add a bunch of modified ports for 10.0, so we can fix the building

  • Property mode set to 100644
File size: 1.1 KB
Line 
1#!/bin/sh
2
3# $FreeBSD: multimedia/mythtv/files/mythbackend.in 300896 2012-07-14 13:54:48Z beat $
4
5# PROVIDE: mythbackend
6# REQUIRE: DAEMON mysql
7# KEYWORD: shutdown
8
9# Define mythbackend_enable in /etc/rc.conf[.local] to enable mythbackend
10#
11# mythbackend_enable (bool):  Set to "NO" by default.
12#                             Set it to "YES" to enable mythbackend.
13# mythbackend_logpath (str):  Custom logpath for mythbackend.
14#                             (default /var/log/mythtv)
15# mythbackend_flags (str):    Additional flags for mythbackend.
16# mythbackend_user (str):     Username to run with.
17
18. /etc/rc.subr
19
20name="mythbackend"
21rcvar=mythbackend_enable
22command="%%PREFIX%%/bin/${name}"
23
24start_precmd="mythbackend_prestart"
25
26mythbackend_prestart()
27{
28        if [ ! -d ${mythbackend_logpath} ]; then
29                /usr/bin/install -o ${mythbackend_user} -g wheel -m 755 -d ${mythbackend_logpath}
30        fi
31}
32
33load_rc_config $name
34
35: ${mythbackend_enable="NO"}
36: ${mythbackend_logpath="/var/log/mythtv"}
37: ${mythbackend_user="root"}
38
39command_args="-d --logpath ${mythbackend_logpath}"
40HOME=$(/usr/sbin/pw usershow -7 -n "${mythbackend_user}" | /usr/bin/cut -d: -f6)
41
42run_rc_command "$1"
Note: See TracBrowser for help on using the repository browser.