
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 04-19-2016 02:09 PM
Hi all,
I've been given a zip file. Within it are a *.pkg file, some config files, and a shell script to run and configure the pkg file.
When I manually unzip it and run the shell script, it works perfectly. The package would install, and the configurations are all done.
I believe Casper by default would download > install > cleanup.
Is there a way for Casper to just download and unzip the zip file? Then I can use the shell script to run the installation sequence as intended.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 04-19-2016 02:34 PM
is it possible to extract the zipped files and put them into a .dmg and deploy in that fashion? The .dmg should just plop the files you need into whatever directory is specified then you can run your shell script.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 04-19-2016 02:26 PM
You'll have to download it and unzip separately with a script in this case.
If you have a https distribution point, you'll be able to download the .zip with the curl
command. Once downloaded, you can unzip the file with the unzip
command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 04-19-2016 02:34 PM
is it possible to extract the zipped files and put them into a .dmg and deploy in that fashion? The .dmg should just plop the files you need into whatever directory is specified then you can run your shell script.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 04-19-2016 04:48 PM
@huangbe - Not sure if this is what you're looking for, but you could just create a policy that does two things:
- Create a package (using Composer or whatever other packaging tool) to put that zip file you have to a known location (like /Users/Shared)
- Run a shell script to do all the commands you want, unzip, run the script, etc.
Then you could do something like this:
echo "Installing my zip file..."
unzip /Users/Shared/ZipFileName.zip -d /intended/location/of/files
CONTENTS of SCRIPT HERE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 04-20-2016 08:48 AM
I had one similar to this recently. I unzipped the files which were in a folder. The folder contained the script.sh and a package and two config files.
I copied the directory (unzipped) to /tmp.
In Composer, I built a package with a post install script that ran the script.sh on the local volume "/"
Since it's in /tmp, it will delete upon next reboot. Worked great.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 04-21-2016 03:52 PM
Thank you all for your responses. @pat.best has the answer that suited me best :)
Packing all the files into a DMG worked. After Self-Service download, I just needed to find the folder/files in root directory (I'm such a noob I didn't know where to find the download before).
Then with Casper JSS, upload the install script as well. The script just needed an extra line to tell it where to find all the files required.
Thanks again :)
