Tag : crashplan

CrashPlan Custom Package for Casper

I was working on automated CrashPlan package for Casper, the official document from Casper is very helpful, but unfortunately didn’t work on our Casper. so I actually used my own way to package CrashPlan.

http://resources.jamfsoftware.com/documents/technical-papers/Deploying-CrashPlan-with-the-Casper-Suite.pdf

Basically there are 4 steps:

  1. Create custom Crashplan installer
    https://YourServerAddress:4285/download/Code42CrashPlan_Custom.zip
  2. Build a package of the Code42 CrashPlan app custom installation settings.
  3. Upload the Code42 CrashPlan App Installer and the custom settings package to the JAMF Software Server (JSS)
  4. Deploy the Code42 CrashPlan App Installer and the custom settings package using a policy.

 

When I try to install via Self Service in Casper, it finished the installation without errors. But nothing was installed. My manager wants to make it not install while the current user is admin, so I just wrote a custom shell script to install instead.

From the official guide on step 2, I created a pkg instead of dmg file. The reason is that my shell script won’t do anything with dmg file ( there is no installer command, that dmg file only contains files)

and then use “Packages” to package a standard Apple package with file extension mpkg.

You can download from here, it is very old, but still working 🙂

http://s.sudre.free.fr/Software/Packages/about.html

Here is my script(postflight file in my package creation):

#!/bin/bash
# Crashplan Custom Install
# by Rui Qiu
# June 2, 2016

#Find current directory
install_dir=`dirname $0`

#Find current user
CP_USER_HOME=”$HOME”
user=`basename $CP_USER_HOME`
userGroup=`id -gn “$user”`
CP_USER_NAME=”$user”

#Compare current user
if [ “$CP_USER_NAME” == “admin” ];then
exit
else
#Installing CrashPlan & Config file
/usr/sbin/installer -dumplog -verbose -pkg $install_dir/”Install_CrashPlan.pkg” -target “$3″
/usr/sbin/installer -dumplog -verbose -pkg $install_dir/”CrashPlanCustom.pkg” -target “$3”

exit 0
fi