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

Collapse All | Expand All

(-)multimedia/mediabrowser/files/mediabrowser.in (-6 / +28 lines)
Lines 11-16 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 used to run the %%PORTNAME%% daemon.
15
#			This is optional, however do not specifically set this to an
16
#			empty string as this will cause the daemon to run as root.
17
#			Default: %%USER%%
18
# %%PORTNAME%%_group:	The group account used to run the %%PORTNAME%% daemon.
19
#			This is optional, however do not specifically set this to an
20
#			empty string as this will cause the daemon to run with group wheel.
21
#			Default: %%GROUP%%
14
# %%PORTNAME%%_data_dir:	Directory where %%PORTNAME%% configuration
22
# %%PORTNAME%%_data_dir:	Directory where %%PORTNAME%% configuration
15
#			data is stored.
23
#			data is stored.
16
#			Default: /var/db/%%PORTNAME%%
24
#			Default: /var/db/%%PORTNAME%%
Lines 21-42 Link Here
21
load_rc_config $name
29
load_rc_config $name
22
30
23
: ${%%PORTNAME%%_enable:="NO"}
31
: ${%%PORTNAME%%_enable:="NO"}
32
: ${%%PORTNAME%%_user:="%%USER%%"}
33
: ${%%PORTNAME%%_group:="%%GROUP%%"}
24
: ${%%PORTNAME%%_data_dir:="/var/db/%%PORTNAME%%"}
34
: ${%%PORTNAME%%_data_dir:="/var/db/%%PORTNAME%%"}
25
35
26
pidfile="/var/run/%%PORTNAME%%.pid"
36
pidfile="/var/run/%%PORTNAME%%.pid"
27
command="/usr/sbin/daemon"
37
command="/usr/sbin/daemon"
28
procname="%%LOCALBASE%%/bin/mono"
38
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}"
39
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
40
31
start_precmd=mediabrowser_precmd
41
start_precmd=%%PORTNAME%%_precmd
32
mediabrowser_precmd()
42
%%PORTNAME%%_precmd()
33
{
43
{
34
	export LC_ALL="C"
44
	: ${LC_ALL:="C"}
35
	export LANG="C"
45
	: ${LANG:="C"}
46
	export LC_ALL
47
	export LANG
36
48
49
	if [ ! -e "${pidfile}" ]; then
50
		install -g ${%%PORTNAME%%_group} -o ${%%PORTNAME%%_user} -- /dev/null "${pidfile}";
51
	fi
52
37
	if [ ! -d "${%%PORTNAME%%_data_dir}" ]; then
53
	if [ ! -d "${%%PORTNAME%%_data_dir}" ]; then
38
		install -d -g %%GROUP%% -o %%GROUP%% "${%%PORTNAME%%_data_dir}";
54
		install -d -g ${%%PORTNAME%%_group} -o ${%%PORTNAME%%_user} -- "${%%PORTNAME%%_data_dir}";
39
	fi
55
	fi
40
}
56
}
41
57
58
stop_postcmd=%%PORTNAME%%_postcmd
59
%%PORTNAME%%_postcmd()
60
{
61
	rm -f -- "${pidfile}"
62
}
63
42
run_rc_command "$1"
64
run_rc_command "$1"
(-)multimedia/mediabrowser/pkg-deinstall (+12 lines)
Line 0 Link Here
1
#!/bin/sh
2
# $FreeBSD$
3
#
4
5
case $2 in
6
	DEINSTALL)
7
		echo "==> If you are uninstalling mediabrowser permanently,"
8
		echo "    and you do *NOT* want to retain the database, logs"
9
		echo "    configuration and media metadata, you should"
10
		echo "    manually delete directory /var/db/mediabrowser."
11
		;;
12
esac

Return to bug 194959