diff options
Diffstat (limited to 'root_scripts')
| -rw-r--r-- | root_scripts/webcam_config.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/root_scripts/webcam_config.sh b/root_scripts/webcam_config.sh new file mode 100644 index 0000000..d90bb85 --- /dev/null +++ b/root_scripts/webcam_config.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# Craig Jennings <c@cjennings.net> +# 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 + +# 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 |
