This file is indexed.

/usr/share/doc/vgrabbj/examples/webcam.sh is in vgrabbj 0.9.8-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
# Amaya Rodrigo sastre <amaya@debian.org>, 15 Jan 2001
# This is free software, under the terms of the GPL v2 or later
# See http://www.gnu.org/copyleft/gpl.html
# Comments on this script are highly appreciated.

pid=`fuser /dev/video | cut -b 22-30`

# If it's not being used, we take a snapshot:
if [ "pid" != "" ]; then
	/usr/bin/vgrabbj
# If it's in use:
else
	# Find out who is using the device:
	program=`ps ax | grep $pid | grep -v grep | cut -d \/ -f 4`

	# If it's a crashed vgrabbj, we kill it and take a snapshot.
	if [ "program" = "vgrabbj" ]; then
		kill -9 $pid
		/usr/bin/vgrabbj
	# If it's another program, leave it alone:
	else
		exit 0
	fi
fi