57 lines
876 B
Bash
57 lines
876 B
Bash
#!/bin/sh
|
|
|
|
|
|
if [ $# -ne 1 ]; then
|
|
echo "$0 ip-address interface"
|
|
echo " ip-address: where to find the OpenWRT device"
|
|
exit 1
|
|
fi
|
|
|
|
my_ip=$1; shift
|
|
|
|
cat <<EOF | ssh -t "root@${my_ip}"
|
|
set -x
|
|
|
|
# update the sources & allow https handling
|
|
opkg update
|
|
opkg install motion kmod-video-uvc
|
|
|
|
EOF
|
|
|
|
exit 0
|
|
|
|
motion sample:
|
|
|
|
daemon off
|
|
setup_mode off
|
|
log_level 2
|
|
|
|
ipv6_enabled on
|
|
|
|
videodevice /dev/video0
|
|
width 1280
|
|
height 720
|
|
input -1
|
|
framerate 15
|
|
|
|
text_left place10, Diesbach
|
|
text_right %Y-%m-%d\n%T-%q
|
|
|
|
emulate_motion off
|
|
|
|
# Threshold for number of changed pixels that triggers motion.
|
|
threshold 1500
|
|
|
|
# Despeckle the image using (E/e)rode or (D/d)ilate or (l)abel.
|
|
despeckle_filter EedDl
|
|
|
|
# Enable this if you have storage attached
|
|
picture_output off
|
|
movie_output off
|
|
|
|
webcontrol_port 8080
|
|
webcontrol_localhost on
|
|
webcontrol_parms 0
|
|
|
|
stream_port 8081
|
|
stream_localhost off
|