Amber icon indicating copy to clipboard operation
Amber copied to clipboard

[Feature] Native lockfile

Open Mte90 opened this issue 1 year ago • 0 comments

So can be handy to be able to run the script just once and not multiple times together.

I am thinking like a statement that you put on top of the bash script file with a bash code like this:

LOCK_FILE=/tmp/$scriptfilename.lock
if [ -f "$LOCK_FILE" ]; then
   echo "Script is already running"
   exit
fi

Mte90 avatar Jun 19 '24 14:06 Mte90