jelockwood / pinpoint

A script for finding your Mac
GNU General Public License v3.0
28 stars 5 forks source link

Errors in LaunchDaemon #2

Closed jelockwood closed 5 years ago

jelockwood commented 6 years ago

The original launchdaemon plist forgot to specify the binary was a .sh script. It also had the startinterval wrong at 10 minutes instead of 60 minutes i.e. one hour.

jelockwood commented 6 years ago

Corrected file path in launchdaemon plist. Corrected startinterval to 3600 seconds i.e. hourly.

myoaungchit commented 5 years ago

Hi there, I deployed the pinpoint via jamf and using your jss extension to read the location data in the com.jelockwood.pinpoint.plist. Base on the plist setting , the location data should be regenerated every hour but I noticed that it is not doing it. Is there any command I can add in jss extension script to force regenerate the location data in plist before reading it ? Thank you.

jelockwood commented 5 years ago

The way you are using it there are two parts involved. There is the main part which is a combination of a shell script and launchdaemon that gets installed on the client Mac, and a script that gets run via JSS to query the results from the client Mac and store as a extension attribute in JSS.

Have you installed the client portion? If so have a look at the results file directly.

And yes, it would be possible to have the JSS extension attribute script force a regeneration by adding a line at the beginning to first run the main pinpoint.sh script as follows.

/Library/Application\ Support/pinpoint/bin/pinpoint.sh

Let me know your results so I can close this issue or take further action.

myoaungchit commented 5 years ago

Thank you for checking on this very fast. Yes, I did the installation for client portion prior to adding JSS extension.

So , in JSS extension, /Library/Application\ Support/pinpoint/bin/pinpoint.sh is added to force generated the location data. However, the new location data was not reflecting in plist after JAMF Inventory Update. I noticed that the time stamp for LastLocationRun was not same as LastRun. For LastRun's timestamp, it tallied with the time stamp for JAMF Inventory Update.

screenshot_2019-02-25_at_8_39_42_am

I changed the command to /Library/Application\ Support/pinpoint/bin/pinpoint.sh -g to see how it goes and , to my surprise, it did update the new location data in plist now.

screenshot 2019-02-25 at 4 49 45 pm

This was tested on the laptops which are currently away from Singapore and their new locations are reflected correctly.

Really appreciate for your work and help, John.

jelockwood commented 5 years ago

Transferred to new issue and reclosed original one.