#!/bin/sh
#file=geisa_purge
#on entry: /users6/geisa/$1=temp directory $2!=0 for wait
#
[ -d /users6/geisa/$1 ]||{ echo "geisa_purge: /users6/geisa/$1 ($2) n,existe pas" >>/users/lefevre/geisa.log;exit;}
echo "geisa_purge: /users6/geisa/$1 ($2) existe" >>/users/lefevre/geisa.log
if [ "$2" != "" ];then
tick=0
while [ $tick -lt 10 ]; do
[ -f /users6/geisa/$1/sync ]&&{ echo "geisa_purge: /users6/geisa/$1/sync ($2) existe au tick $tick" >>/users/lefevre/geisa.log;exit;}
tick=`expr $tick + 1`
sleep 1
done
fi
/usr/bin/rm -fR /users6/geisa/$1
echo "geisa_purge: /users6/geisa/$1 ($2) detruit" >>/users/lefevre/geisa.log
