summaryrefslogtreecommitdiff
path: root/audio/icecast/files/icecast.in
blob: 37badb986990570161919fc4ef2764da550b2424 (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
36
37
38
#!/bin/sh

# PROVIDE: icecast
# REQUIRE: DAEMON
# BEFORE:  LOGIN
# KEYWORD: shutdown

# Add the following line to /etc/rc.conf to enable `icecast'.
#
#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=icecast_enable

command="%%PREFIX%%/bin/icecast"
command_args="-b 1>/dev/null"
extra_commands="reload"

# 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"