View | Details | Raw Unified | Return to bug 194959 | Differences between
and this patch

Collapse All | Expand All

(-)mediabrowser/files/mediabrowser.in (-3 / +13 lines)
Lines 11-38 Link Here
11
#
11
#
12
# %%PORTNAME%%_enable:	Set to YES to enable %%PORTNAME%%
12
# %%PORTNAME%%_enable:	Set to YES to enable %%PORTNAME%%
13
#			Default: NO
13
#			Default: NO
14
# %%PORTNAME%%_user:	The user account %%PORTNAME%% daemon runs as.
15
#			It uses '%%USER%%' user by default.
16
#			Do not sets it as empty or it will run as root.
17
# %%PORTNAME%%_group:	The group account %%PORTNAME%% daemon runs as.
18
#			It uses '%%GROUP%%' group by default.
19
#			Do not sets it as empty or it will run as wheel.
14
# %%PORTNAME%%_data_dir:	Directory where %%PORTNAME%% configuration
20
# %%PORTNAME%%_data_dir:	Directory where %%PORTNAME%% configuration
15
#			data is stored.
21
#			data is stored.
16
#			Default: /var/db/%%PORTNAME%%
22
#			Default: /var/db/%%PORTNAME%%
17
23
24
18
. /etc/rc.subr
25
. /etc/rc.subr
19
name=%%PORTNAME%%
26
name=%%PORTNAME%%
20
rcvar=${name}_enable
27
rcvar=${name}_enable
21
load_rc_config $name
28
load_rc_config $name
22
29
23
: ${%%PORTNAME%%_enable:="NO"}
30
: ${%%PORTNAME%%_enable:="NO"}
31
: ${%%PORTNAME%%_user:="%%USER%%"}
32
: ${%%PORTNAME%%_group:="%%GROUP%%"}
24
: ${%%PORTNAME%%_data_dir:="/var/db/%%PORTNAME%%"}
33
: ${%%PORTNAME%%_data_dir:="/var/db/%%PORTNAME%%"}
25
34
26
pidfile="/var/run/%%PORTNAME%%.pid"
35
pidfile="/var/run/%%PORTNAME%%.pid"
27
command="/usr/sbin/daemon"
36
command="/usr/sbin/daemon"
28
procname="%%LOCALBASE%%/bin/mono"
37
procname="%%LOCALBASE%%/bin/mono"
29
command_args="-f -u %%USER%% -p ${pidfile} ${procname} %%PREFIX%%/lib/mediabrowser/MediaBrowser.Server.Mono.exe -ffmpeg %%LOCALBASE%%/bin/ffmpeg -ffprobe %%LOCALBASE%%/bin/ffprobe -programdata ${%%PORTNAME%%_data_dir}"
38
command_args="-f -p ${pidfile} ${procname} %%PREFIX%%/lib/mediabrowser/MediaBrowser.Server.Mono.exe -ffmpeg %%LOCALBASE%%/bin/ffmpeg -ffprobe %%LOCALBASE%%/bin/ffprobe -programdata ${%%PORTNAME%%_data_dir}"
30
39
31
start_precmd=mediabrowser_precmd
40
start_precmd=mediabrowser_precmd
32
mediabrowser_precmd()
41
mediabrowser_precmd()
33
{
42
{
34
	export LC_ALL="C"
43
	if [ ! -e ${pidfile} ]; then
35
	export LANG="C"
44
		install -g ${%%PORTNAME%%_group} -o ${%%PORTNAME%%_user} /dev/null ${pidfile}
45
	fi
36
46
37
	if [ ! -d "${%%PORTNAME%%_data_dir}" ]; then
47
	if [ ! -d "${%%PORTNAME%%_data_dir}" ]; then
38
		install -d -g %%GROUP%% -o %%GROUP%% "${%%PORTNAME%%_data_dir}";
48
		install -d -g %%GROUP%% -o %%GROUP%% "${%%PORTNAME%%_data_dir}";
(-)mediabrowser/pkg-message (-1 / +1 lines)
Lines 4-10 Link Here
4
from ports with the lame support option enabled.
4
from ports with the lame support option enabled.
5
5
6
To automatically start MediaBrowser at boot time:
6
To automatically start MediaBrowser at boot time:
7
# echo 'mediabrowser_enable="YES"' >> /etc/rc.conf
7
# sysrc mediabrowser_enable="YES"
8
8
9
To then manually start MediaBrowser without rebooting:
9
To then manually start MediaBrowser without rebooting:
10
# service mediabrowser start
10
# service mediabrowser start

Return to bug 194959