hmmm sleep is cool no point in processing an if a zillion times whilst copying...
lock files are more for when you have multiple processes though; ie you which to determine if a group of processes launched from another script are running...
what you want to do is create a function called i'm done; create a trap which launches the funtion which lanches hanachi again...
eg
Code:
/etc/init.d/hama stop
rsync files...
rsync files...
rsync files...
function imDone()
{
echo "starting hamacho again all done..."
/etc/init.d/ham start
}
trap imDone EXIT
lemmie kno if you need help with this
Bookmarks