#!/bin/sh

# $FreeBSD: audio/liquidsoap/files/liquidsoap.in 302141 2012-08-05 23:19:36Z dougb $
#
# PROVIDE: liquidsoap
# REQUIRE: NETWORKING icecast2 shoutcast
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable liquidsoap:
#
# liquidsoap_enable="YES"
#

. /etc/rc.subr

name=liquidsoap
rcvar=liquidsoap_enable

command=/usr/local/bin/liquidsoap

load_rc_config $name

: ${liquidsoap_enable:="NO"}
: ${liquidsoap_pidfile:="/var/run/liquidsoap/radio.pid"}
: ${liquidsoap_config:="/usr/local/etc/liquidsoap/radio.liq"}
: ${liquidsoap_user:="liquidsoap"}
: ${liquidsoap_group:="liquidsoap"}

required_files="${liquidsoap_config}"
command_args="-q -d ${liquidsoap_config}"

run_rc_command "$1"
