blob: e87babd3c66908ff50143fa871c92854b4b9c17c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: musicpd
# REQUIRE: mixer LOGIN avahi_daemon oss
# KEYWORD: shutdown
# Add the following line to /etc/rc.conf to enable mpd:
#
# musicpd_enable=YES
. /etc/rc.subr
name=musicpd
rcvar=musicpd_enable
desc="Music Player Daemon"
load_rc_config $name
: ${musicpd_enable:=NO}
command=%%PREFIX%%/bin/musicpd
command_args=%%PREFIX%%/etc/musicpd.conf
required_files=%%PREFIX%%/etc/musicpd.conf
start_precmd=${name}_getpidfile
stop_precmd=${name}_getpidfile
musicpd_getpidfile()
{
if get_pidfile_from_conf pid_file %%PREFIX%%/etc/musicpd.conf ; then
pidfile="$_pidfile_from_conf"
else
pidfile="/var/mpd/.mpd/pid"
fi
}
run_rc_command $1
|