#!/bin/sh # Craig Jennings # getyer webcam workin' # ensure root if ! [ $(id -u) -eq 0 ] then echo "Must run as root. Exiting." exit fi # install all needed pkg install -y v4l-utils v4l_compat webcamd pwcview cheese # add character device in userspace sysrc kld_list="${kld_list} cuse" sysrc webcamd_enable=YES # flags are between brackets in 'webcamd -l' output. # Example: # webcamd [-d ugen1.3] -N Generic-Laptop-Camera -S 200901010001 -M 0 # add that to rc.conf also sysrc webcamd_0_flags="-d ugen1.3" # add yourself to the webcamd group pw groupmod webcamd -m cjennings # start the service service webcamd start