#!/bin/sh # $FreeBSD$ # PROVIDE: mediatomb # REQUIRE: DEAMON # KEYWORD: shutdown # Define these mediatomb_* variables in one of these files: # /etc/rc.conf # /etc/rc.conf.local # /etc/rc.conf.d/mediatomb # # DO NOT CHANGE THESE DEFAULT VALUES HERE # . %%RC_SUBR%% mediatomb_enable=${mediatomb_enable-"NO"} # mediatomb_flags="" # mediatomb_interface="" mediatomb_mtuser=${mediatomb_mtuser-"%%MEDIATOMB_USER%%"} mediatomb_mtgroup=${mediatomb_mtgroup-"%%MEDIATOMB_GROUP%%"} mediatomb_config=${mediatomb_config-"%%PREFIX%%/etc/mediatomb/config.xml"} mediatomb_logfile=${mediatomb_logfile-"%%MEDIATOMB_DIR%%/mediatomb.log"} mediatomb_pidfile=${mediatomb_pidfile-"%%MEDIATOMB_DIR%%/mediatomb.pid"} name="mediatomb" rcvar=`set_rcvar` load_rc_config $name if [ "xx" != "x${mediatomb_interface}x" ]; then mediatomb_interface_command="-e ${mediatomb_interface}" else mediatomb_interface_command="" fi command="%%PREFIX%%/bin/mediatomb" command_args="-d -c ${mediatomb_config} -l ${mediatomb_logfile} -u ${mediatomb_mtuser} -g ${mediatomb_mtgroup} -P ${mediatomb_pidfile} ${mediatomb_interface_command}" pidfile="${mediatomb_pidfile}" run_rc_command "$1"