#!/bin/sh -
# $Id: flushlocks,v 1.1 1998/09/28 04:15:22 master Exp master $
#
# 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
