2015-02-11 16:58:54 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
2021-04-09 14:31:51 -04:00
|
|
|
# PROVIDE: owntone
|
2015-02-11 16:58:54 -05:00
|
|
|
# REQUIRE: avahi_daemon dbus
|
|
|
|
|
2021-04-09 14:31:51 -04:00
|
|
|
# Add the following lines to /etc/rc.conf to enable `owntone':
|
2015-02-11 16:58:54 -05:00
|
|
|
#
|
2021-04-09 14:31:51 -04:00
|
|
|
# owntone_enable="YES"
|
|
|
|
# owntone_flags="<set as needed>"
|
2015-02-11 16:58:54 -05:00
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
2021-04-09 14:31:51 -04:00
|
|
|
name="owntone"
|
2015-02-11 16:58:54 -05:00
|
|
|
rcvar=`set_rcvar`
|
|
|
|
|
2021-04-09 14:31:51 -04:00
|
|
|
command="/usr/local/sbin/owntone"
|
|
|
|
command_args="-P /var/run/owntone.pid"
|
|
|
|
pidfile="/var/run/owntone.pid"
|
|
|
|
required_files="/usr/local/etc/owntone.conf"
|
2015-02-11 16:58:54 -05:00
|
|
|
|
|
|
|
# read configuration and set defaults
|
|
|
|
load_rc_config "$name"
|
2021-04-09 14:31:51 -04:00
|
|
|
: ${owntone_enable="NO"}
|
2015-02-11 16:58:54 -05:00
|
|
|
|
|
|
|
run_rc_command "$1"
|