1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-29 10:18:30 +00:00
freebsd-ports/audio/icecast2/files/icecast2.sh.in
Sahil Tandon fac7eaa8f8 - Add support for custom config file location
PR:		ports/145779
Submitted by:	Jille Timmermans <jille@quis.cx>
Approved by:	Sunpoet Hsieh (maintainer), wxs@ (mentor)
2010-04-24 20:45:05 +00:00

41 lines
800 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: icecast2
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
# Add the following line to /etc/rc.conf to enable `icecast2'.
#
#icecast_enable="YES"
#
# To specify a non-default configuration file, set icecast_config
# in /etc/rc.conf:
#
#icecast_config="%%PREFIX%%/etc/icecast.xml"
#
# Make sure the <changeowner> section in your configuration file is
# not commented out - icecast refuses to run as root.
#
. /etc/rc.subr
name="icecast"
rcvar=`set_rcvar`
command="%%PREFIX%%/bin/icecast"
command_args="-b 1>/dev/null"
# read configuration and set defaults
load_rc_config "$name"
: ${icecast_enable="NO"}
: ${icecast_config="%%PREFIX%%/etc/${name}.xml"}
: ${icecast_flags="-c ${icecast_config}"}
required_files="${icecast_config}"
run_rc_command "$1"