#!/bin/sh # Copyright © 2001, 2005 Jamie Zawinski # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation. No representations are made about the suitability of this # software for any purpose. It is provided "as is" without express or # implied warranty. # # Created: 23-May-01. PATH=/usr/local/bin:$PATH PATH=/home/jwz/src/slideshow:$PATH export PATH progname=slideshow-grab delay=1 grab_init() { echo "started at `date`" # make sure the kernel module is loaded echo "loading bttv module" modprobe bttv v4lctl setnorm ntsc # settle down echo "pausing..." sleep 5 } grab_loop() { grab_init echo "looping..." while true ; do slideshow-grab.sh sleep $delay done } # log all stdout/stderr text to syslog log_lines() { while read line ; do logger -st "$progname" "$line" done } grab_loop 2>&1 | log_lines exit 0