
13 Feb
2019
13 Feb
'19
11:02 p.m.
Hi Tony,
You could try creating a new file in the /tmp folder in process then remove it on closing of the script. Subsequent scripts might start then check for for the presence of this file. If it exists simply delay until it is gone or exit the script.
I tried this in PHP but must have done it badly because it didn't work. Actually doing this in the parent bash script makes a whole lot more sense
Example #ScriptRun # while fileexists /tmp/ScriptOn Sleep(5) # or if FileExists /tmp/ScriptOn Exit; CreateFile /tmp/ScriptOn #Do the rest of your work after the check. ... #On exit from current instance Ddeletefile /tmp/ScriptOn
Is that supposed to be *Deletefile* ?
Hope this helps.
It does & thank you Tony. Cheers Piers