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

_______________________________________________
luv-main mailing list
[email protected]
https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main

Reply via email to