Thank you for contacting us.
I’d like to ask one question to make sure I fully understand your request.
Do you want the Edison to be running and then, after you push the button, for the Edison to run the script. This script places the Edison in Online mode and then after a certain amount of time, in offline mode, and then end the script?
Or, do you want to completely remove the button and have the Edison boot in online mode and be continuously switching between online and offline mode?
If your goal is similar to the first case, modify the script. This script could be activated after pushing the button. After the script is activated, it will run for the time it is configured to do so in online mode, and then offline mode. The script will end and would be activated again after pushing the button.
If you’re looking for a solution for the second scenario, you could use a service to run the script automatically after boot. The script should have a parameter that defines for how long the Edison is going to be in online mode before switching to offline mode. If you’re looking for information about services you can check: https://www.losant.com/blog/edison-automatic-process-startup
Let us know if this answers your questions.
I'm looking for a solution of the second scenario! I will check the link that you provided and try to implement it.
Also, I have a question about what is running when the button is being pressed. In that case it shows this "address" /etc/init.d/networking. So, I should look for the script that runs when I press the button and then include it to the services?
Go ahead and try our suggestion. Let us know your results.
In regards to your question, it was my understanding that you already have a script that allows you to configure the network’s mode using a push button. This script would just need to have an extra few lines that define for how long the board will be in online mode to later change to offline mode, without the need of a button. The job of the service would be to start the script at boot.
We’ll be waiting for your response.