Zeile 73: |
Zeile 73: |
| Administration --> Weimarnetz --> Einstellungen --> OLSR | | Administration --> Weimarnetz --> Einstellungen --> OLSR |
| | | |
− | <blockquote> | + | === Script zur Installation === |
| + | <blockquote><syntaxhighlight lang="shell"> |
| + | #!/bin/sh |
| | | |
| + | # rev 0.3 by R.Hoffmann @20240206 |
| + | |
| + | opkg update |
| + | opkg install kmod-video-uvc |
| + | opkg install mjpg-streamer |
| + | opkg install mjpg-streamer-input-uvc |
| + | opkg install mjpg-streamer-output-http |
| + | |
| + | mkdir -p /www/webcam/ |
| + | |
| + | IP=$(/sbin/uci get network.lan.ipaddr) |
| + | HOSTNAME=$(/sbin/uci get ffwizard.settings.hostname) |
| + | |
| + | cat <<EOF >/www/webcam/index.html |
| + | <html> |
| + | <head> |
| + | <title>Webcam auf ${HOSTNAME}</title> |
| + | </head> |
| + | <body> |
| + | <center> |
| + | <img src="http://${IP}:8080?action=stream" /> |
| + | </center> |
| + | </body> |
| + | </html> |
| + | EOF |
| + | |
| + | cat <<EOF >/etc/config/mjpg-streamer |
| + | config mjpg-streamer 'core' |
| + | option enabled '1' |
| + | option input 'uvc' |
| + | option output 'http' |
| + | option device '/dev/video0' |
| + | option resolution '1024x768' |
| + | option yuv '0' |
| + | option quality '80' |
| + | option fps '5' |
| + | option led 'auto' |
| + | option www '/www/webcam' |
| + | option port '8080' |
| + | #option listen_ip '192.168.1.1' |
| + | #option username 'openwrt' |
| + | #option password 'openwrt' |
| + | EOF |
| + | |
| + | /etc/init.d/mjpg-streamer start |
| + | |
| + | echo -e "\n\nto register your new service call:\n\t/sbin/uci add_list ffwizard.olsr.service='http://${IP}:80/webcam/|tcp|Webcam auf ${HOSTNAME}'" |
| + | </syntaxhighlight> |
| | | |
| </blockquote> | | </blockquote> |
| [[Kategorie:Howto]] | | [[Kategorie:Howto]] |