OpenWrt lightweight streamer for OSS (/dev/dsp) uncompressed sound data.
[oss-streamer.git] / etc / init.d / oss-streamer
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2009-2013 OpenWrt.org
3
4 START=90
5 STOP=10
6
7 USE_PROCD=1
8 PROG=/usr/bin/oss-streamer
9
10 error() {
11         echo "${initscript}:" "$@" 1>&2
12 }
13
14 start_instance() {
15         procd_open_instance
16         procd_set_param command "$PROG" -p 8081 -d /dev/dsp
17         procd_close_instance
18 }
19
20 start_service() {
21         start_instance 'oss-streamer'
22 }
23
24 service_triggers() {
25         procd_add_reload_trigger 'oss-streamer'
26 }