How to update Login/Logout Hooks

Kedgar
Contributor

I would like to know by which mechanism are login and logout hooks updated? For instance, I have a script that I want run upon login. I had this scoped to myself as a test, and have since updated the script. The changes in the script are not applying to my machine after trying the following:
- ran a jamf recon
- ran a jamf manage
- ran a jamf policy
- ran a jamf createHooks

Is there something I'm missing?

7 REPLIES 7

davidacland
Honored Contributor II
Honored Contributor II

The login / logout hooks don't change, they just call a script which runs any policies using the login and / or logout triggers. So they should be reading the script from the JSS.

gachowski
Valued Contributor II

Wrong post : )

mm2270
Legendary Contributor II

Heh, never mind.

Kedgar
Contributor

@davidacland this particular one runs a script that is also set to run offline... I failed to mention this, sorry.

mm2270
Legendary Contributor II

Ah, you may be running into an issue where the offline cached script is getting called instead of downloading it from the server. I'd flush out the cached policy from the Mac. These get stored inside /Library/Application Support/JAMF/Offline Policies/ and will be inside a folder in that location with the name of the policy, so you may need to delete that entire policy name directory.
Note that the "Offline Policies" folder is a protected location, so you'll need root to even peek inside it.

Kedgar
Contributor

@mm2270 Thanks dude... I think that will do the trick

davidacland
Honored Contributor II
Honored Contributor II

Hmm, not sure without testing. Some things that I suspect would refresh it:

  • Removing the computers from the scope of the policy, waiting for them to check-in, and then adding them back into scope. I would expect that they would remove the offline copies from the clients if they are no longer in scope.
  • Switching off the offline setting, waiting for clients to checkin and then re-enable it.

Bit of a pain either way though.