- Install configuration file if it does not exist PR: ports/148082 Submitted by: Chris Rees <utisoft@gmail.com> (maintainer)
34 lines
500 B
Bash
34 lines
500 B
Bash
#!/bin/sh
|
|
#
|
|
|
|
# PROVIDE: musicpd
|
|
# REQUIRE: LOGIN
|
|
# KEYWORD: shutdown
|
|
|
|
# Add the following line to /etc/rc.conf to enable mpd:
|
|
#
|
|
#musicpd_enable="YES"
|
|
|
|
. /etc/rc.subr
|
|
|
|
name=musicpd
|
|
rcvar=`set_rcvar`
|
|
stop_cmd="${name}_stop"
|
|
|
|
config=%%PREFIX%%/etc/%%MPDCONF%%
|
|
command=%%PREFIX%%/bin/mpd
|
|
required_files=$config
|
|
|
|
musicpd_stop()
|
|
{
|
|
echo -n "Stopping musicpd: ";
|
|
${command} --kill ${config} && echo "stopped.";
|
|
}
|
|
|
|
load_rc_config $name
|
|
|
|
: ${musicpd_enable="NO"}
|
|
|
|
command_args="$config"
|
|
|
|
run_rc_command "$1"
|