blob: f83e96473e359625504c41e952894735ffd3b8d6 (
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
|
#!/sbin/openrc-run
depend() {
need icecast
}
checkconfig() {
if [ ! -e ${CONFIGFILE} ]; then
eerror "You need to make a config file"
return 1
fi
}
start() {
checkconfig || return 1
ebegin "Starting ezstream"
start-stop-daemon --background --start --pidfile /var/run/ezstream.pid \
--make-pidfile --user icecast --group nogroup \
--exec /usr/bin/ezstream -- ${EZSTREAM_OPTS} -c "${CONFIGFILE}"
eend $?
}
stop() {
ebegin "Stopping ezstream"
start-stop-daemon --stop --pidfile /var/run/ezstream.pid --name ezstream
eend $?
}
reload() {
ebegin "Reloading ezstream"
kill -1 `cat /var/run/ezstream.pid`
eend $?
}
|