entrypoint.sh: create `video` group if it does not exist

pull/9/head
Sameer Naik 9 years ago
parent 0e83b43a8f
commit e68eea101b

@ -86,13 +86,15 @@ grant_access_to_video_devices() {
do
if [[ -c $device ]]; then
VIDEO_GID=$(stat -c %g $device)
VIDEO_GROUP=$(stat -c %G $device)
if [[ ${VIDEO_GROUP} == "UNKNOWN" ]]; then
VIDEO_GROUP=video
groupadd -g ${VIDEO_GID} ${VIDEO_GROUP}
fi
usermod -a -G ${VIDEO_GROUP} ${BROWSER_BOX_USER}
break
fi
done
if [[ -n $VIDEO_GID ]]; then
usermod -a -G $VIDEO_GID ${BROWSER_BOX_USER}
fi
}
launch_browser() {

Loading…
Cancel
Save