Created
August 3, 2016 06:23
-
-
Save grahamgilbert/4f203157a7463ee602493216871ac370 to your computer and use it in GitHub Desktop.
Enable Auto TimeZone
This file contains hidden or 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 | |
/bin/launchctl unload /System/Library/LaunchDaemons/com.apple.locationd.plist | |
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/sbin/chown -R _locationd:_locationd /var/db/locationd | |
/bin/launchctl load /System/Library/LaunchDaemons/com.apple.locationd.plist | |
/usr/sbin/systemsetup -setusingnetworktime on | |
/bin/rm -f /Library/Preferences/com.apple.timezone.auto.plist | |
/usr/bin/defaults write /Library/Preferences/com.apple.timezone.auto Active -bool true | |
/usr/bin/plutil -convert xml1 /Library/Preferences/com.apple.timezone.auto.plist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment