Easy bash script locking with mkdir
It's very easy to implement locking in a bash script using mkdir.
While there are other methods like:
* Touch a file and check its availability
* Use special tools like lockfile-progs in Debian or lockfile in other
distributions
* Find the running process with pgrep
I prefer mkdir for simple