-
Notifications
You must be signed in to change notification settings - Fork 5
Preferences
pinpoint stores its configuration info in the com.jelockwood.pinpoint
preferences domain, i.e. /Library/Preferences/com.jelockwood.pinpoint.plist
, however configuration profiles pushed via your Mobile Device Management (MDM) solution are also supported as is specifying them as command line parameters.
You would set the values using the standard defaults command as follows.
sudo defaults write /Library/Preferences/com.jelockwood.pinpoint USE_GEOCODE -bool TRUE
sudo defaults write /Library/Preferences/com.jelockwood.pinpoint USE_ALTITUDE -bool FALSE
sudo defaults write /Library/Preferences/com.jelockwood.pinpoint YOUR_API_KEY -string "yourkeygoeshere"
The order pinpoint looks for preferences is -
- Command line options
- Managed Preferences - as pushed by an MDM system
- Local Preferences -
/Library/Preferences/com.jelockwood.pinpoint.plist
- Hard coded in to the script itself
If the Google API key is found using say option 1 above then the remaining options are skipped.
If your using command line options you can get help by specifying pinpoint.sh -h
however as a quick summary if you include the options for either altitude or geocode this means those settings are true and if you do not include those options they are considered to be as hardcoded into the script. Here is an example execution of pinpoint with options:
pinpoint.sh --altitude --geocode --key yourkeygoeshere
NOTE: If you use the command line method then all the other sources of preferences are ignored. This means you must then include the --key option as well as any other options.
Key | Type | Default | Description |
---|---|---|---|
USE_GEOCODE | boolean | TRUE | If set to true then pinpoint will also use the Google Geocode API to look up the street address for the location, if set to false it skips this and records the location as an empty string but saves on an additional API call thereby either preventing you exceeding your quota or reducing the cost. |
USE_ALTITUDE | boolean | FALSE | If set to true then pinpoint will also use the Google Elevation API to determine the altitude, if set to false it skips this and records the altitude as zero but saves on an additional API call thereby either preventing you exceeding your quota or reducing the cost. |
YOUR_API_KEY | string | API key for using the Google location service api. Get your key here. |
Here's a sample of /Library/Preferences/com.jelockwood.pinpoint.plist
:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>USE_GEOCODE</key>
<true/>
<key>USE_ALTITUDE</key>
<false/>
<key>YOUR_API_KEY</key>
<string></string>
</dict>
</plist>
If you are going to push these settings via an MDM e.g. JAMF JSS then you define these preferences as a Configuration Profile of type Custom Setting. Here is what an example Custom Setting would look like in JSS.
As a reminder, JSS requires you to upload the Custom Settings as an XML plist file. If the plist file is in binary format you must first convert it to XML format using the following command.
plutil -convert xml1 ExampleBinary.plist