26 lines
439 B
Plaintext
Raw Normal View History

#!/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
}