i am still waiting for the next crash, but this script should do the trick:
It needs to be run in the background, using nohup or some other way.
Code:
#!/bin/bash
myIP=10.10.10.1
while :
do
sleep 30;
if ping -c 1 -W 1 "$myIP" 2>&1 > /dev/null ; then
echo `date` "$myIP is alive"
else
echo `date` "$myIP is dead"
logger "Trying to restart wlan9"
/home/pi/.openplotter/start1.sh
fi
done