mirror of
https://github.com/SuperBFG7/ympd
synced 2024-11-26 14:57:17 +00:00
added FreeBSD RC script
This commit is contained in:
parent
ec008a4995
commit
40906e2bee
29
contrib/ympd.freebsd
Executable file
29
contrib/ympd.freebsd
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
#!/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"
|
||||||
|
command="/usr/local/bin/ympd"
|
||||||
|
pidfile="/var/run/${name}.pid"
|
||||||
|
start_cmd="ympd_start"
|
||||||
|
|
||||||
|
load_rc_config "$name"
|
||||||
|
: ${ympd_enable:="NO"}
|
||||||
|
: ${ympd_user:="nobody"}
|
||||||
|
|
||||||
|
ympd_start()
|
||||||
|
{
|
||||||
|
check_startmsgs && echo "Starting ${name}."
|
||||||
|
/usr/sbin/daemon -f -p "${pidfile}" -t "${name}" -u "${ympd_user}" "${command}"
|
||||||
|
}
|
||||||
|
|
||||||
|
run_rc_command "$1"
|
Loading…
Reference in New Issue
Block a user