Created
March 21, 2022 06:33
-
-
Save matthewhochler/ff92790ed0094ce53e997d83fe2e2778 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
while [ true ] | |
do | |
if ifconfig | pcregrep -M -o '^[^\t:]+(?=:([^\n]|\n\t)*status: active)' | grep awdl0; | |
then | |
echo "Shutting down awdl0..." | |
ifconfig awdl0 down | |
else | |
echo "Not active..." | |
fi | |
sleep 5 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment