packages/scpa5xx-view: use lowercase config option, use new service functions
[openwrt/svn-archive/archive.git] / multimedia / spca5xx-view / files / servfox.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2006-2011 OpenWrt.org
3
4 START=90
5
6 satrt_instance() {
7 local cfg="$1"
8 local res
9 local dev
10 local port
11
12 config_get res "$cfg" 'resolution'
13 config_get dev "$cfg" 'device'
14 config_get port "$cfg" 'port'
15 service_start bin/servfox ${dev:+-d $dev} ${res:+-s $res} ${port:+-w $port}
16 }
17
18 start() {
19 config_load 'servfox'
20 config_foreach start_instance 'servfox'
21 }
22
23 stop() {
24 service_stop /bin/servfox
25 }