Worklet: Install Box client on Mac

This worklet will check to see if Box is installed and if it isn’t, will download and install it.

See this KB article for how to setup a worklet:

Evaluation Code:


if [ -d "/Applications/Box" ]; then
    exit 0
    exit 1

Remediation Code:


echo -e "Downloading Box Sync..."
curl -L -o "/tmp/Box Sync Installer.dmg"

echo -e "Installing Box Sync..."
hdiutil attach "/tmp/Box Sync Installer.dmg" -nobrowse
ditto "/Volumes/Box Sync Installer/Box" "/Applications/Box"

echo -e "Cleaning up..."
hdiutil detach "/Volumes/Box Sync Installer"
rm -f "/tmp/Box Sync Installer.dmg"
1 Like