freebsd-ports/audio/musicpd/files/musicpd.in
Sahil Tandon b171055c7d - Update to 0.15.12
- Install configuration file if it does not exist

PR:		ports/148082
Submitted by:	Chris Rees <utisoft@gmail.com> (maintainer)
2010-07-25 02:48:54 +00:00

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"