#!/bin/bash

if /sbin/ifconfig wlan0 | /bin/grep -q "inet addr:" ; then
  logger "Tested Inet connection - everything ok"
  echo "Tested Inet connection - everything ok"
else
  logger "Network connection down! Attempting reconnection."
  echo "Network connection down! Attempting reconnection."
  /sbin/ifup --force wlan0
fi
