#!/bin/sh

#echo 'Making sure that files have correct group and permissions...'

DBDIR=$1

# when finished with xace, run find to make sure
# that lock.wrm is deleted, if it exists AND we 
# own that file.

# Assuming that environment varibles are inherited
# from birchdb, which calls this script.


if [ -d "$DBDIR" ]
then 
   echo "Cleaning up dead lock files in $DBDIR"
   cd $DBDIR
   find . -name lock.wrm -user `whoami`  -exec rm {} \;
fi
echo "cleanup.sh finished"
 
#Make sure files in 'new' and 'touched' directories
# are in drr group and are group writeable

#find ./new ./touched ./readlocks ./oldlogs -user `whoami` -exec chgrp psgendb {} \; -exec chmod g+rw {} \;



