scripts automatically cached

_derOliver
New Contributor

Hey guys,

I'm facing a problem where it seems, that some scripts are cached somehow. When I look at the policy Logs everything is fine, my Script is downloaded. But i changed the script recently and the old version is executed. When I download the script file manually, I get the new Version. At the moment, this occurs on a script run by the LoginHook trigger, but I'm sure, that I seen this behavior also on a normal policy some time ago.

Renaming the script gets the new version executed, but this is obviously not a solution for every script.

Is there a known caching directory used by the jamf binary? If I look at the /Library/Application Support/JAMF/ directory, there is no cached script, not even in a renamed version. Problems caused by multiple Distribution Pionts can be excluded, as we only have one.

Any hints?

Thank you!

Oliver Kett

1 ACCEPTED SOLUTION

stevewood
Honored Contributor II
Honored Contributor II

Silly question, but are you saving your changes in Casper Admin and shutting down Casper Admin before trying to run the policy? I've seen instances where CA doesn't fully apply the change until the app is shut down.

View solution in original post

10 REPLIES 10

ctangora
Contributor III

Are you behind a load balancer for your JSS?

_derOliver
New Contributor

no, there is a direct connection between the Clients and Servers. I should mention, that this only occurs after changing the script multiple times.

acdesigntech
Contributor II

is casper admin prompting you to replace the script when you upload it? Are you changing the name once you upload to Admin (not the script name, the name in casper admin)?

How are you deploying the script - remote, policy?

What do the logs in the JSS say?

_derOliver
New Contributor

Yes, Casper Admin promts me to replace the script. I never changed the name in Admin, I deleted it from Admin and the uploaded it with a new name.

It is deployed via a policy, which is run at LoginHook trigger. The Logs look quite normal:

Executing Policy LoginHook: RRZE Laufwerke...
Creating directory structure for /Library/Application Support/JAMF/Downloads/
Downloading https://csshare.rrze.uni-erlangen.de/Scripts/mountShares.sh...
Running script mountShares.sh...
Script result: [...]

Is the checksum of the script shown by Admin checked by the Client to verfiy if there is a new version of the file to download?

stevewood
Honored Contributor II
Honored Contributor II

Silly question, but are you saving your changes in Casper Admin and shutting down Casper Admin before trying to run the policy? I've seen instances where CA doesn't fully apply the change until the app is shut down.

bentoms
Release Candidate Programs Tester

If you manually connect to the casper share, if the correct version there?

Also, is the policy set to be cached?

_derOliver
New Contributor

I save my changes in CA but most of the time not close it (but will give it a try). Whats driving me crazy is, that if I ssh into my Distribution Point, the changes are there. There must be a caching algorithm somewhere...

ctangora
Contributor III

@stevewood, I've seen funkiness also.

We were uploading scripts to CA then deleting them out of CA before saving and quitting. Turns out CA would delete the script on the local machine as well!

I've found the best practice (especially with more than one admin) is to just use CA for uploading, then save and quit. Then go in through the JSS web interface to make the changes.

bentoms
Release Candidate Programs Tester

Sounds like we either need: https://jamfnation.jamfsoftware.com/featureRequest.html?id=704

Or to move to JDS shares & use the Casper Admin interface in the JSS.

_derOliver
New Contributor

Just FYI: this might be the cache folder I was searching for:

/var/root/Library/Caches/jamf/fsCachedData