#!/bin/sh -
# $Id: flushlocks,v 1.1.1.1 1993/03/07 08:30:51 frankj Exp $
#
# If you run this file daily from a crontab, it will clean up
# old lock-files.

LIBDIR=xxxx
PLAYERDIR=$LIBDIR/players

LOGFILE=$LIBDIR/adm/lock.log
touch $LOGFILE

cd $PLAYERDIR
files=`find ./ -type d -name \*.lock -mtime 1 -print`
if test x"$files" = x; then
  exit
fi
echo Flushing lockfiles `date` >>$LOGFILE
  
ls -ld $files >>$LOGFILE

rmdir $files
