mirror of
https://github.com/mrhaav/openwrt.git
synced 2024-10-30 15:20:52 +00:00
11 lines
252 B
Bash
11 lines
252 B
Bash
#!/bin/sh
|
|
|
|
pingWWAN=$(ping 8.8.8.8 -c 4 -W 1 -I wwan0 | grep packets | awk '{print $7 }' | sed s/%//g)
|
|
|
|
if [ "$pingWWAN" = 100 ] || [ -z "$pingWWAN" ]
|
|
then
|
|
logger -t check_wwan wwan0 connection broken
|
|
logger -t check_wwan Restart wwan0
|
|
ifup wwan
|
|
fi
|