aboutsummaryrefslogtreecommitdiff
path: root/audio/linux-shoutcast/files/shoutcast.sh.in
blob: eadc86683c1f15bc664e53adf308a3970c3b15f6 (plain) (blame)
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
#!/bin/sh
#

# PROVIDE: shoutcast
# REQUIRE: LOGIN
# BEFORE:
# KEYWORD: shutdown

. /etc/rc.subr

name="shoutcast"
rcvar=`set_rcvar`
start_cmd="shoutcast_startcmd"
stop_cmd="shoutcast_stopcmd"

shoutcast_startcmd ()
{
su shoutcast -c '%%PREFIX%%/sbin/sc_serv %%PREFIX%%/etc/shoutcast/sc_serv.conf & >/dev/null 2>&1'
}

shoutcast_stopcmd ()
{
killall sc_serv
}

load_rc_config $name
run_rc_command "$1"