Created
July 29, 2019 22:31
-
-
Save soundsnw/743d3cc32499c149af043d03681879d5 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
#!/bin/bash | |
# Enable location services and automatic time zone configuration | |
/usr/bin/defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd LocationServicesEnabled -int 1 | |
uuid=$(/usr/sbin/system_profiler SPHardwareDataType | grep "Hardware UUID" | cut -c22-57) | |
/usr/bin/defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd.$uuid LocationServicesEnabled -int 1 | |
/usr/bin/defaults write /Library/Preferences/com.apple.timezone.auto Active -bool YES | |
/usr/bin/defaults write /private/var/db/timed/Library/Preferences/com.apple.timed.plist TMAutomaticTimeOnlyEnabled -bool YES | |
/usr/bin/defaults write /private/var/db/timed/Library/Preferences/com.apple.timed.plist TMAutomaticTimeZoneEnabled -bool YES | |
/usr/sbin/systemsetup -setusingnetworktime on | |
/usr/sbin/systemsetup -gettimezone | |
/usr/sbin/systemsetup -getnetworktimeserver | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment