1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-10-02 16:06:20 +03:00

m1-files. remove mjpg-streamer. useless for m1

This commit is contained in:
Xiangfu 2012-05-14 09:39:02 +08:00
parent 81a45499ec
commit e1dab766a1

View File

@ -1,56 +0,0 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2009-2011 OpenWrt.org
START=50
SERVICE_DAEMONIZE=1
SERVICE_WRITE_PID=1
PROG=/usr/bin/mjpg_streamer
error() {
echo "${initscript}:" "$@" 1>&2
}
section_enabled() {
config_get_bool enabled "$1" 'enabled' 0
[ $enabled -gt 0 ]
}
start_instance() {
local s="$1"
section_enabled "$s" || return 1
config_get device "$s" 'device'
config_get resolution "$s" 'resolution'
config_get fps "$s" 'fps'
config_get port "$s" 'port'
[ -c "$device" ] || {
error "device '$device' does not exist"
return 1
}
service_start /usr/bin/mjpg_streamer --input "input_uvc.so \
--device $device --fps $fps --resolution $resolution -y" \
--output "output_http.so --port $port"
}
stop_instance() {
local s="$1"
section_enabled "$s" || return 1
service_stop /usr/bin/mjpg_streamer
}
start() {
config_load 'mjpg-streamer'
config_foreach start_instance 'mjpg-streamer'
}
stop() {
config_load 'mjpg-streamer'
config_foreach stop_instance 'mjpg-streamer'
}