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?
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?