Go to advanced search

by electricalbanana
Thu Feb 14, 2013 9:54 pm
Forum: Beginners
Topic: Wifi Reconnect on drop
Replies: 61
Views: 140554

Re: Wifi Reconnect on drop

Code: Select all

#!/bin/bash

while true ; do
   if ifconfig wlan0 | grep -q "inet addr:" ; then
      sleep 60
   else
      echo "Network connection down! Attempting reconnection."
      ifup --force wlan0
      sleep 10
   fi
done
This is not beautiful but works great!
Thanks

Go to advanced search