#!/bin/sh # $FreeBSD: head/net/mediatomb/files/mediatomb.in 397755 2015-09-24 19:49:17Z pi $ # PROVIDE: mediatomb # REQUIRE: DAEMON # 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 # . /etc/rc.subr mediatomb_enable=${mediatomb_enable-"NO"} # mediatomb_flags="" # mediatomb_interface="" mediatomb_mtuser=${mediatomb_mtuser-"mediatomb"} mediatomb_mtgroup=${mediatomb_mtgroup-"mediatomb"} mediatomb_config=${mediatomb_config-"%%PREFIX%%/etc/mediatomb/config.xml"} mediatomb_logfile=${mediatomb_logfile-"/var/log/mediatomb/mediatomb.log"} mediatomb_pidfile=${mediatomb_pidfile-"/var/run/mediatomb.pid"} name="mediatomb" rcvar=mediatomb_enable 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"