15 lines
258 B
Bash
Executable File
15 lines
258 B
Bash
Executable File
#!/bin/sh
|
|
|
|
LOG=/tmp/nw-restarted
|
|
while [ 1 ] ; do
|
|
ping -c 1 192.168.0.250 > /dev/null
|
|
ret=$?
|
|
if [ $ret != 0 ]; then
|
|
date >> $LOG
|
|
sudo rmmod rtl8187; sleep 1; sudo modprobe rtl8187 >> $LOG
|
|
else
|
|
echo "still good at `date`" >> $LOG
|
|
fi
|
|
sleep 60
|
|
done
|