Skip to content

Instantly share code, notes, and snippets.

@MatthewFlamm
Created August 16, 2019 11:05
Show Gist options
  • Save MatthewFlamm/79f021ff7e4b123d4e22e6ade911b5b8 to your computer and use it in GitHub Desktop.
Save MatthewFlamm/79f021ff7e4b123d4e22e6ade911b5b8 to your computer and use it in GitHub Desktop.
Restart pi wlan
#!bin/bash
ping -c 1 192.168.0.1 > /dev/null 2>&1
if [ $? -ne 0 ]
then
date
ifconfig wlan0
sudo ip link set wlan0 down
sudo ip link set wlan0 up
ifconfig wlan0
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment