Where do you put your scripts?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 06-16-2014 08:38 AM
Hi,
Out of curiosity I'm wondering where on the disk you store your custom scripts? Is there a specific path that is preferred or used as best practise when it comes to deploying custom scripts?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 06-16-2014 08:47 AM
Can you clarify what you're referring to? Do you mean if you need to permanently deploy a script file to a system for later use in a policy?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 06-16-2014 08:49 AM
Yeah, that's what I mean. I didn't know how to phrase it better than that. Sorry for the confusion.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 06-16-2014 08:59 AM
That's fine, just wasn't sure.
I wouldn't say there is any real "best practice" for this. We use something like /private/var/scripts/ The "scripts" directory is of course created since it doesn't exist natively, but plenty of people use other paths. Some might even use something like /Library/Scripts/, or /Library/Scripts/CompanyName/
My very general suggestion would be to keep them out of sight from casual browsing, so some normally hidden directory like /private/var/ or such would be a good choice. You don't typically want your more curious users seeing them and thinking they need to delete them or wondering what they are. Even if there is nothing "secret" in the scripts like hardcoded usernames and passwords, its best that they don't try removing or modifying them for the sake of your policies.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 06-16-2014 09:23 AM
Are scripts in JSS 9 now stored in the JSS database?
Migrating Packages and Scripts
https://jamfnation.jamfsoftware.com/article.html?id=327
If you have upgraded from the Casper Suite v8.x and you want to utilize the cloud distribution point, a JAMF Distribution Server (JDS) instance, or the script editor in the JSS, you must first migrate all the scripts and packages on your master distribution point. This migrates all scripts to the jamfsoftware database, and compresses all non-flat PKGs as ZIP files.
When we migrated from 8.73>9.31 we found (and JAMF confirmed) that we had to Migrate everything in the DP (currently a file share), so the article might need to be updated.
To cache the script for offline use, the policy must be set to Ongoing, then you'll get that option.
Page 208 of the 9.31 admin guide:
Make the policy available offline. (This only works with the "Ongoing" execution frequency.)
HTH,
Don
https://donmontalvo.com

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 06-16-2014 09:42 AM
Don,
You're right, this is a good idea, however it doesn't cover scripts that are called by launchagents and launchdaemons.
We keep our scripts in /Library/Application Support/JAMF/Scripts, and the launchagents and launchdaemons that we use know to call the scripts from inside that directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 06-16-2014 10:50 AM
We use /Library/Scripts/CompanyName/ for scripts that are called via LaunchAgents & outlook setup.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 06-17-2014 12:41 AM
Alright! Thanks for all the replies, lots of useful information! :)
