mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-26 05:02:18 +00:00
6fa6d8c005
Approved by: jrm Differential Revision: https://reviews.freebsd.org/D16236
40 lines
700 B
Bash
40 lines
700 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: ympd
|
|
# REQUIRE: DAEMON NETWORKING musicpd
|
|
# KEYWORD: shutdown
|
|
|
|
# Add the following line to /etc/rc.conf to enable ympd:
|
|
#
|
|
# ympd_enable (bool): set to NO by default.
|
|
# Set it to YES to enable ympd.
|
|
#
|
|
# ympd_flags (string): optional flags to pass through to daemon
|
|
|
|
. /etc/rc.subr
|
|
|
|
name=ympd
|
|
rcvar=ympd_enable
|
|
desc="A lightweight web UI for audio/musicpd"
|
|
|
|
# defaults
|
|
: ${ympd_enable:=NO}
|
|
: ${ympd_flags:=""}
|
|
|
|
load_rc_config ${name}
|
|
|
|
start_cmd="ympd_start"
|
|
|
|
command="%%PREFIX%%/bin/${name}"
|
|
pidfile="/var/run/${name}.pid"
|
|
|
|
ympd_start () {
|
|
echo "Starting ympd."
|
|
/usr/sbin/daemon -t ${name} -f -p ${pidfile} ${command} ${ympd_flags}
|
|
}
|
|
|
|
run_rc_command "$1"
|