nico 92399c4d51 packages/scpa5xx-view: use lowercase config option, use new service functions
git-svn-id: svn://svn.openwrt.org/openwrt/packages@29078 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-13 22:16:23 +00:00

26 lines
439 B
Bash

#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2011 OpenWrt.org
START=90
satrt_instance() {
local cfg="$1"
local res
local dev
local port
config_get res "$cfg" 'resolution'
config_get dev "$cfg" 'device'
config_get port "$cfg" 'port'
service_start bin/servfox ${dev:+-d $dev} ${res:+-s $res} ${port:+-w $port}
}
start() {
config_load 'servfox'
config_foreach start_instance 'servfox'
}
stop() {
service_stop /bin/servfox
}