Box Sync Deployment (macOS)
Description
Box Sync is a desktop sync application that keeps all your files safe and secure in the cloud, while having them available on your computer and accessible from anywhere, on any device with Box mobile apps. No matter how you work, Box Sync helps you keep your files organized, safe, and always in sync with your business.
Ingredients
- FW Central
- (Other tools, features, and applications that will be needed)
Directions
- Create a new empty fileset (From the Fileset View : New Desktop Fileset > Empty : Type a Name > OK)
- With it selected: Click the Scripts item in the button bar
- Create a new activation script and name it.
- Paste the script below and edit
The fileset is composed of a script that downloads the latest version of Box Sync from the Box CDN and executes the Install .app to install Box Sync. It uses a bootstrapped provided by box that allows the installation from any user account. Once the app is installed it configures itself for the customers account and prompts the customer to log into their Box Account.
#!/bin/bash
# Original Script by Bryson Tyrrell | bryson.tyrrell@gmail.com | http://twitter.com/bryson3gps
# Modified on December 16, 2015 by Gilbert Palau | Univision Desktop Engineering | gpalau@univision.net
#
# The BoxEdit components Box Local Com Server.app and Box Edit.app are launched via launch_app.sh code
# added with permission of Elliot Jordan <elliot@lindegroup.com>
# launch_app was created on 02-10-2015 and last modified by Elliot Jordan on 02-27-2015 | v1.2
# Integrated on 12-18-2015 by Gilbert Palau | Univision Desktop Engineering | gpalau@univision.net
#
# Much thanks to Bryson, who figured out the command line to install from within the app...
# Install\ Box\ Tools.app/Contents/MacOS/Box\ Tools\ Installer -silent -local
policy="Box Edit 3.1.2"
loggertag="system-log-tag"
tmpdir="/tmp/"
downloadurl="https://e3.boxcdn.net/box-installers/boxedit/mac/currentrelease/BoxEditInstaller.dmg"
# Knock Knock... Who is there?
CURRENT_USER_LOGIN_PID=$(ps auxww | grep "/System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow" | grep "$CURRENT_USER" | grep -v "grep" | awk '{print $2}')
CURRENT_USER=$(python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "\n");')
# Download BoxEdit Package from EvilBox
echo ""
echo "Downloading Box Edit"
webCheckSum=$(curl -sI $downloadurl | tr -d '\r' | awk '/Content-Length/ {print $2}')
curl -fkS --progress-bar $downloadurl -o /$tmpdir/BoxEditInstaller.dmg
# curl -fkS --progress-bar https://e3.boxcdn.net/box-installers/boxedit/mac/currentrelease/BoxEditInstaller.dmg -o /tmp/BoxEditInstaller.dmg
fileCheckSum=$(cksum /$tmpdir/BoxEditInstaller.dmg | awk '{print $2}')
if [ $webCheckSum -ne $fileCheckSum ]; then
rm /$tmpdir/BoxEditInstaller.dmg
echo "The file did not download properly, exiting..."
exit 101
fi
echo "Mounting Box Edit DMG..."
hdiutil attach -quiet /$tmpdir/BoxEditInstaller.dmg
if [ $? -ne 0 ]; then
rm /$tmpdir/BoxEditInstaller.dmg
echo "The Box Edit DMG failed to mount properly, exiting..."
exit 102
fi
cp -fR /Volumes/Box\ Tools\ Installer/Install\ Box\ Tools.app /$tmpdir/
hdiutil eject -quiet /Volumes/Box\ Tools\ Installer/
rm /$tmpdir/BoxEditInstaller.dmg
echo "Running the Box Edit Installer app"
# This is the golden goose... Thanks Bryson!
/usr/bin/su $CURRENT_USER -c "/$tmpdir/Install\ Box\ Tools.app/Contents/MacOS/Box\ Tools\ Installer -silent -local"
echo "Finished"
exit 0
No Comments