blob: 6431d6af7750f767dde3501d343087623df250d0 (
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
|
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: forked-daapd
# REQUIRE: avahi_daemon dbus
# KEYWORD: shutdown
#
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# forked_daapd_enable (bool): Set to NO by default.
# Set it to YES to enable forked-daapd.
# forked_daapd_config (path): Set to %%PREFIX%%/etc/forked-daapd.conf
# by default.
# forked_daapd_flags (str): Set to "" by default
. /etc/rc.subr
name=forked_daapd
rcvar=${name}_enable
load_rc_config $name
: ${forked_daapd_enable:="NO"}
: ${forked_daapd_config:="%%PREFIX%%/etc/forked-daapd.conf"}
: ${forked_daapd_flags:=""}
pidfile="/var/run/forked-daapd.pid"
required_files="$forked_daapd_config"
command="%%PREFIX%%/sbin/forked-daapd"
command_args="-P $pidfile -c $forked_daapd_config $forked_daapd_flags"
run_rc_command "$1"
|