I have installed two crontabs:
Code: Select all
* * * * * /usr/bin/checknetwork
* * * * * /usr/bin/gpio-test2.pyBut the first line is not executed at all. If i call the checknetwork skript directly, it reconnects if wlan0 has no IP address. But the execution using crontab does not work.
Code: Select all
echo "Performing Network check for wlan0"
if ifconfig wlan0 | grep -q "inet Adresse:" ; then
echo "Network is Okay"
else
echo "Network connection down! Attempting reconnection."
ifdown wlan0
sleep 5
ifup --force wlan0
ifconfig wlan0 | grep "inet Adresse:"
fi
echo "Current Setting:" + ifconfig wlan0 | grep "inet Adresse:"
exit 0Christian