"Network Is Unreachable" Error for Bash Script at Startup
I Have a Bash Script That Is Run at Startup on an Odroid Running Ubuntu Mate. the Script Connects to the Wifi and Then Calls a Python Script Which Makes a Http...
I have a bash script that is run at startup on an Odroid running Ubuntu Mate. The script connects to the wifi and then calls a python script which makes a http request:
...
nmcli dev connect NETWORKNAME password PASSWD
python my_script.py
...
This script works when I call it after boot. However, when it is called during boot, the "Network is unreachable" error is thrown. I tried to use the ethernet connection but the result is the same. Also, adding a sleep 30 command before calling the python script doesn't work. How can I solve this problem?