Skip to content

Commit

Permalink
Fix default value for USE_GECODE preference
Browse files Browse the repository at this point in the history
  • Loading branch information
jelockwood authored Feb 20, 2019
1 parent 9b34430 commit 0239a43
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions installer_package/postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ if [ ! -f "/Library/Preferences/com.jelockwood.pinpoint.plist" ]; then
/usr/bin/defaults write "/Library/Preferences/com.jelockwood.pinpoint" USE_ALTITUDE -bool FALSE
/usr/bin/defaults write "/Library/Preferences/com.jelockwood.pinpoint" USE_GEOCODE -bool TRUE
/usr/bin/defaults write "/Library/Preferences/com.jelockwood.pinpoint" YOUR_API_KEY -string ""
else
use_geocode=`/usr/bin/defaults read "/Library/Preferences/com.jelockwood.pinpoint" USE_GEOCODE`
if [ -z "$use_geocode" ]; then
/usr/bin/defaults write "/Library/Preferences/com.jelockwood.pinpoint" USE_GEOCODE -bool TRUE
fi
use_altitude=`/usr/bin/defaults read "/Library/Preferences/com.jelockwood.pinpoint" USE_ALTITUDE`
if [ -z "$use_altitude" ]; then
/usr/bin/defaults write "/Library/Preferences/com.jelockwood.pinpoint" USE_ALTITUDE -bool FALSE
fi
your_api_key=`/usr/bin/defaults read "/Library/Preferences/com.jelockwood.pinpoint" YOUR_API_KEY`
if [ -z "$your_api_key" ]; then
/usr/bin/defaults write "/Library/Preferences/com.jelockwood.pinpoint" YOUR_API_KEY -string ""
fi
fi
/bin/launchctl load "/Library/LaunchDaemons/com.jelockwood.pinpoint.plist"
exit

0 comments on commit 0239a43

Please sign in to comment.