Auto reconnect to wifi when lost connect Create script file Use touch /home/pi/wifi-reconnect.sh to create shell script file, with following content: #!/bin/bash SSID=$(/sbin/iwgetid --raw)