Bash: How to check if your script is already running
Sometimes, you don’t want a script to run when it is already running. Maybe it is scheduled as a cronjob but the previous run of that cronjob hasn’t finished yet. I usually do some “pre-flight checks” in almost every script I write. And most times, this is one of them.
Continue reading →