4 setterm
-inversescreen off
17 if [[ $
(echo "$usb" |
grep "12d1:1506") ]] ; then
21 setterm
-inversescreen
22 echo -e "\n\n*** Replug Modem ***\n\n"
23 disp
"UMTS Fatal Error" #Modem Error: fatal!
24 sleep 5 #read -p "press enter" #while : ; do; done #halt exec
26 if [[ $
(echo "$usb" |
grep "12d1:14fe") ]] ; then
28 usb_modeswitch
-v 12d1
-p 14fe
-V 12d1
-P 1506 -M
29 '55534243123456780000000000000011062000000100000000000000000000'
30 disp
"UMTS Modeswitch" #Modem Warning: mode
36 if [[ $
(echo "$usb" |
grep "0cf3:9271") ]] ; then
40 setterm
-inversescreen
41 echo -e "\n\n*** Replug WiFi ***\n\n"
42 disp
"WiFi Fatal Error" #WiFi Error: fatal!
43 sleep 5 #read -p "press enter" #while : ; do; done #halt exec
47 echo -ne "\nhostapd: "
49 if [[ $
(echo "$proc" |
grep "hostapd" |
grep -v "grep") ]] ; then
53 #hostpad /etc/hostapd.conf &
54 service hostapd restart
55 disp
"hostapd restart" #Service warning: hostapd
59 echo -ne "\ndnsmasq: "
61 if [[ $
(echo "$proc" |
grep "dnsmasq" |
grep -v "grep") ]] ; then
65 service dnsmasq restart
66 disp
"dnsmasq restart" #Service warning: dnsmasq
72 if [[ $
(echo "$proc" |
grep "wvdial" |
grep -v "grep") ]] ; then
78 #killall modem-manager
80 disp
"wvdial restart" #Service warning: wvdial
87 if [[ $
(ping google.com
-c 4 -i 0.2) ]] ; then
92 wget
-q --tries=3 --timeout=5 http
://google.com
/generate_204
-O - &>/dev
/null
93 if [[ $?
-eq 0 ]] ; then
95 #4 OK, get client list
96 clients
=$
(iw dev wlan0 station dump|
grep Station|
wc -l)
97 echo "\nClients: $clients"
98 disp
"Luftinternet $clients"
99 #disp "Luftinternet :)"
100 #disp "Luftinternet $(iw dev wlan0 station dump|grep Station|wc -l)"
103 disp
"wget error unknw" #Unknown Error: wget!
107 disp
"ping error unknw" #ping error
114 dispprogress
#sleep 10 #dispprogress is a python script that displays a cursor and waits approx 8sec