summaryrefslogtreecommitdiffstats
path: root/audio/icecast2/files/icecast2.sh.in
blob: accb36722e61f2b6926e28abf31a2a4f90ebdfad (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
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: icecast2
# REQUIRE: DAEMON
# BEFORE:  login
# KEYWORD: FreeBSD shutdown

# Add the following line to /etc/rc.conf to enable `icecast2'. This requires
# a working configuration in %%PREFIX%%/etc/icecast.xml.
#
#icecast_enable="YES"
#
# Make sure the <changeowner> section in your %%PREFIX%%/etc/icecast.xml is
# not commented out - icecast refuses to run as root.
#

. "%%RC_SUBR%%"

name="icecast"
rcvar=`set_rcvar`

command="%%PREFIX%%/bin/icecast"
command_args="1>/dev/null"
required_files="%%PREFIX%%/etc/$name.xml"

# read configuration and set defaults
load_rc_config "$name"
: ${icecast_enable="NO"}
: ${icecast_flags="-c ${required_files} -b"}

run_rc_command "$1"
OpenPOWER on IntegriCloud