Skip to content

Instantly share code, notes, and snippets.

@talkingmoose
Last active March 11, 2022 20:30
Show Gist options
  • Save talkingmoose/cdfc21bdfb048d096f798d56505c9e4c to your computer and use it in GitHub Desktop.
Save talkingmoose/cdfc21bdfb048d096f798d56505c9e4c to your computer and use it in GitHub Desktop.
Delay script to verify current Wi-Fi SSID is set before continuing.
#!/bin/bash
setupProcess=$( /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk '/ SSID/ {print substr($0, index($0, $2))}' )
# specify SSID
while [[ "$setupProcess" != "TMI Wi-Fi" ]]
do
sleep 1
echo "Sleeping 1 second..."
setupProcess=$( /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk '/ SSID/ {print substr($0, index($0, $2))}' )
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment