ask-sheldon.com
Lock shellscript process under Unix based systems | Bravehartk2's Blog
This tiny snippet shows how to lock shellscript process on Unix based systems by using the flock command to tie a script to a respective lock file.