secret
Last active

  • Download Gist
locationservicesenable.sh
Shell
1 2 3 4 5 6 7 8 9
#!/bin/sh
 
launchctl unload /System/Library/LaunchDaemons/com.apple.locationd.plist
uuid=`/usr/sbin/system_profiler SPHardwareDataType | grep "Hardware UUID" | cut -c22-57`
defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd.$uuid LocationServicesEnabled -int 1
chown -R _locationd:_locationd /var/db/locationd
launchctl load /System/Library/LaunchDaemons/com.apple.locationd.plist
 
exit 0

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.