What's new

prevent a jffs script to be run twice in parallel

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

slytho

Regular Contributor
Hi!

When I power on/reboot my AC86-router, it runs the '/jffs/scripts/wan0-connected' script twice. I can also see the wifi appear, then disappear after a few seconds and come back again after a few more seconds.

This causes the commands in the above said script to be run twice and in parallel.

My question: how can I prevent a bash script from being run twice and simultaneously when there's already another instance of the script running?
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top