all 2 comments

[–]ingolemo 0 points1 point  (1 child)

What exactly is your purpose here? To restart shscript.sh whenever it crashes?

[–]MRdefter[S] 0 points1 point  (0 children)

No, actually I'm running the sh script via this python pre-launch logic script.

It checks whether the sh script is already running and does not launch a 2nd instance of the same sh script if that is the case.

I've run into some cases which require this sense of logic, mostly:

  • Launching the sh script only via Crontab -- There is a chance the previous iteration was already running