Last active
April 30, 2024 14:53
-
-
Save meistermeier/4713c3ed733fbb8d79220cb78997ebaf to your computer and use it in GitHub Desktop.
iphone hotspot config
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 | |
if [[ -z $1 || $1 == "off" ]]; then | |
echo "Resetting Wi-Fi to DHCP" | |
networksetup -setdhcp Wi-Fi | |
exit 0 | |
fi | |
if [[ $1 == "on" ]]; then | |
echo "Setting manual ip address" | |
networksetup -setmanual Wi-Fi 172.20.10.3 255.255.255.240 172.20.10.1 | |
exit 0 | |
fi | |
echo "meistermeier did something wrong." | |
exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
./iphone_hotspot.sh off
use dhcp./iphone_hotspot.sh on
use static ip config