2010-12-14 07:11:04 +01:00
|
|
|
#!/bin/sh
|
2013-06-19 22:34:57 +02:00
|
|
|
#
|
2013-11-27 16:24:16 +01:00
|
|
|
# $FreeBSD: head/net/minidlna/files/minidlna.in 323762 2013-07-26 23:25:40Z wg $
|
2010-12-14 07:11:04 +01:00
|
|
|
#
|
|
|
|
# PROVIDE: minidlna
|
2010-12-18 20:57:07 +01:00
|
|
|
# REQUIRE: LOGIN
|
|
|
|
# KEYWORD: shutdown
|
2010-12-14 07:11:04 +01:00
|
|
|
#
|
|
|
|
# Add the following line to /etc/rc.conf[.local] to enable minidlna:
|
|
|
|
#
|
|
|
|
# minidlna_enable="YES"
|
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name=minidlna
|
2012-01-14 09:57:23 +01:00
|
|
|
rcvar=minidlna_enable
|
2010-12-14 07:11:04 +01:00
|
|
|
|
2010-12-18 20:57:07 +01:00
|
|
|
load_rc_config $name
|
|
|
|
|
|
|
|
minidlna_enable=${minidlna_enable-"NO"}
|
|
|
|
minidlna_uid=${minidlna_uid-"%%USER%%"}
|
|
|
|
|
2013-06-19 22:34:57 +02:00
|
|
|
command=%%PREFIX%%/sbin/minidlnad
|
2013-06-09 22:10:54 +02:00
|
|
|
pidfile="/var/run/minidlna/minidlna.pid"
|
2013-06-19 22:34:57 +02:00
|
|
|
command_args="-P $pidfile -u $minidlna_uid -f %%PREFIX%%/etc/minidlna.conf"
|
2010-12-14 07:11:04 +01:00
|
|
|
|
2013-06-19 22:34:57 +02:00
|
|
|
start_precmd="install -d -o $minidlna_uid ${pidfile%/*} /var/db/minidlna"
|
|
|
|
stop_postcmd="rm -f $pidfile"
|
2010-12-14 07:11:04 +01:00
|
|
|
|
2012-05-08 04:09:19 +02:00
|
|
|
extra_commands=rescan
|
2013-06-09 22:10:54 +02:00
|
|
|
rescan_cmd="$command -R -u $minidlna_uid -f %%PREFIX%%/etc/minidlna.conf"
|
2010-12-14 07:11:04 +01:00
|
|
|
|
|
|
|
run_rc_command $1
|