[openwrt] update mjpeg streamer

This commit is contained in:
Nico Schottelius 2021-07-19 21:53:26 +02:00
parent 438dce61c6
commit fc2aa93d5e

View file

@ -27,47 +27,19 @@ uci set mjpg-streamer.core.enabled=1
uci set mjpg-streamer.core.resolution="1920x1080"
uci delete mjpg-streamer.core.username
uci delete mjpg-streamer.core.password
if ! uci show firewall | grep "name='Allow-Camera'"; then
uci add firewall rule
uci set firewall.@rule[-1].name='Allow-HTTP'
uci set firewall.@rule[-1].src='wan'
uci set firewall.@rule[-1].proto='tcp'
uci set firewall.@rule[-1].dest_port='8080'
uci set firewall.@rule[-1].target='ACCEPT'
fi
uci commit
/etc/init.d/mjpg-streamer restart
EOF
exit 0
# This is old code / when we used motion
cat <<EOF | ssh -t "root@${openwrt_ip}"
set -x
opkg update
opkg install motion kmod-video-uvc
uci set motion.general.enabled=1
cat > /etc/motion.conf <<COF
ipv6_enabled on
daemon off
process_id_file /var/run/motion/motion.pid
setup_mode off
webcontrol_port 8080
webcontrol_localhost on
videodevice /dev/video0
v4l2_palette 8
width 1280
height 720
videodevice /dev/video0
input -1
stream_port 8081
stream_localhost off
COF
/etc/init.d/motion restart
EOF