2017-02-06 19:19:09 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# PROVIDE: ympd
|
|
|
|
# REQUIRE: DAEMON musicpd
|
|
|
|
# KEYWORD: shutdown
|
|
|
|
|
|
|
|
# Add the following line to /etc/rc.conf to enable ympd:
|
|
|
|
#
|
|
|
|
# ympd_enable="YES"
|
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name="ympd"
|
|
|
|
rcvar="${name}_enable"
|
2018-01-28 20:22:06 +00:00
|
|
|
command="/usr/local/bin/${name}"
|
2017-02-06 19:19:09 +00:00
|
|
|
pidfile="/var/run/${name}.pid"
|
|
|
|
start_cmd="ympd_start"
|
|
|
|
|
2018-01-28 20:22:06 +00:00
|
|
|
load_rc_config "${name}"
|
2017-02-06 19:19:09 +00:00
|
|
|
: ${ympd_enable:="NO"}
|
|
|
|
|
|
|
|
ympd_start()
|
|
|
|
{
|
|
|
|
check_startmsgs && echo "Starting ${name}."
|
2018-01-28 20:22:06 +00:00
|
|
|
/usr/sbin/daemon -f -p "${pidfile}" "${command}" "${rc_flags}"
|
2017-02-06 19:19:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
run_rc_command "$1"
|