I want to reboot my wireless network when it stops responding. I found this
script , but when I run it I get: line 3: [0: command not found
Any idea what I'm doing wrong?
ping -c4 192.168.1.1 > /dev/null
if [ $? != 0 ]
then
echo "No network connection, restarting wlan0"
/sbin/ifdown 'wlan0'
sleep 5
/sbin/ifup --force 'wlan0'
fi