Grab wifi status from iwconfig instead of nmcli
[khatus.git] / bin / khatus_sensor_net_wifi_status
index de7fd58..033572a 100755 (executable)
@@ -2,14 +2,8 @@
 
 set -e
 
-nmcli \
-    -f ACTIVE,SSID,SIGNAL \
-    -t \
-    d wifi \
-| awk \
-    -F ':' \
-    '
-    BEGIN       {wifi_status = "--"}
-    $1 == "yes" {wifi_status =  $2 ":" $3 "%"}
-    END         {print wifi_status}
-    '
+dir_bin="$1"
+wifi_interface="$2"
+
+iwconfig "$wifi_interface" \
+| "$dir_bin"/khatus_parse_iwconfig -v requested_interface="$wifi_interface"
This page took 0.023716 seconds and 4 git commands to generate.