Created
June 9, 2017 18:53
-
-
Save gregneagle/c0123c72ac821985a675ea18c1128f08 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/python | |
import os | |
import pwd | |
from Foundation import CFPreferencesAppSynchronize | |
from Foundation import CFPreferencesSetValue | |
from Foundation import kCFPreferencesCurrentUser | |
from Foundation import kCFPreferencesCurrentHost | |
uid = pwd.getpwnam('_locationd').pw_uid | |
os.setuid(uid) | |
CFPreferencesSetValue('LocationServicesEnabled', True, 'com.apple.locationd', | |
kCFPreferencesCurrentUser, kCFPreferencesCurrentHost) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment