Before you start, make sure ip
command is available on your system. In modern Linux distributions, ip
replaces older ifconfig
command. If net-tools
package (that includes ifconfig
) is not installed and you prefer using it, you can install it via sudo apt-get install net-tools
.
Use touch /home/pi/wifi-reconnect.sh
to create a shell script file,
with the following content:
#!/bin/bash