mirror of
https://github.com/TECHNOFAB11/tmux2k.git
synced 2025-12-11 23:50:08 +01:00
fix: check for device before fetching ssid
This commit is contained in:
parent
0745a1bea8
commit
e00f421240
1 changed files with 2 additions and 1 deletions
|
|
@ -16,7 +16,8 @@ get_ssid() {
|
||||||
;;
|
;;
|
||||||
|
|
||||||
Darwin)
|
Darwin)
|
||||||
SSID=$(networksetup -getairportnetwork en1 | awk -F ": " '{print $2}')
|
device_name=$(networksetup -listallhardwareports | grep -A 1 Wi-Fi | grep Device | awk '{print $2}')
|
||||||
|
SSID=$(networksetup -getairportnetwork "$device_name" | awk -F ": " '{print $2}')
|
||||||
if [ -n "$SSID" ]; then
|
if [ -n "$SSID" ]; then
|
||||||
printf '%s' " $SSID"
|
printf '%s' " $SSID"
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue