#!/bin/sh # $FreeBSD$ # # PROVIDE: musicpd # REQUIRE: mixer LOGIN avahi_daemon oss # KEYWORD: shutdown # Add the following line to /etc/rc.conf to enable mpd: # # musicpd_enable=YES . /etc/rc.subr name=musicpd rcvar=musicpd_enable load_rc_config $name : ${musicpd_enable:=NO} command=%%PREFIX%%/bin/musicpd command_args=%%PREFIX%%/etc/musicpd.conf required_files=%%PREFIX%%/etc/musicpd.conf start_precmd=${name}_getpidfile stop_precmd=${name}_getpidfile musicpd_getpidfile() { if type get_pidfile_from_conf >/dev/null 2>&1 && get_pidfile_from_conf pid_file %%PREFIX%%/etc/musicpd.conf ; then pidfile="$_pidfile_from_conf" else pidfile="%%MPDDIR%%/.mpd/pid" fi } run_rc_command $1