Mass Deploying to Macs through Apple Remote Desktop

Representative Console Installation with Apple Remote Desktop

  1. From your Bomgar Appliance's /login interface, go to the My Account page.
  2. In the Bomgar Representative Console section, select Mac OS® X as your platform and click Download Bomgar Representative Console. Save the installer package to a location that you can access from Apple Remote Desktop.

The following steps outline how to convert the bomgar-rep-installer.dmg file into a .pkg file.

  1. Copy the code under Code for wrap_rep_installer.sh. Paste it into a text editor and save it with the file name wrap_rep_installer.sh. You must save this file to the same location where you saved the installer package.
  2. Copy the code under Code for rep.plist. Paste it into a text editor and save it as rep.plist. You must save this file to the same location where you saved the installer package and the wrap_rep_installer.sh file.
    1. In rep.plist, locate <key>RootRelativeBundlePath</key> and change its value to match your Bomgar support site hostname. Be sure to leave the .app file extension.
    2. Example: <string>Bomgar Representative Console - support.example.com.app</string>
    3. Save rep.plist.
  3. You should now have three files saved to the same location:
    • bomgar-rep-installer.dmg
    • wrap_rep_installer.sh
    • rep.plist
  4. From a Terminal window, run the following command, replacing <path/to/bomgar-rep-installer.dmg> with the correct path:

./wrap_rep_installer.sh <path/to/bomgar-rep-installer.dmg>

  1. This will output a .pkg file with the same name as the .dmg (bomgar-rep-installer.pkg).

The rest of these steps occur in Apple Remote Desktop.

  1. Select a computer list in the Remote Desktop window.
  2. Select one or more computers in the selected computer list.
  3. Select Manage > Install Packages.
  4. Add the bomgar-rep-installer.pkg file to the package list window.
  5. You can set all other options to your specifications.
  6. Click Install. (Alternatively, you can save or schedule this installation.)
  7. The Bomgar representative console silently installs. Your users can now log into and run the representative console.

Code for wrap_rep_installer.sh

#!/bin/bash

 

function realpath

{

    local path=${1:-.}

    if [[ -d "$path" ]]; then

        (cd "$path" && pwd)

    elif [[ -f "$path" ]]; then

        echo $(cd "$(dirname "$path")" && pwd)/$(basename "$path")

    else

        echo "$FUNCNAME: $0 -- path not found: $path" >&2

        return 1

    fi

}

 

if [[ $# -ne 1 ]]; then

cat << EOF

Usage: $0 <path/to/rep-installer.dmg>

EOF

    exit 1

fi

 

dmgPath=`realpath $1`

shift 1

 

if [[ -f $dmgPath ]];

then

    echo "Packaging $dmgPath."

else

    echo "$dmgPath must exist and and be a disk image."

    exit 1

fi

 

mountPoint="/Volumes/bomgar-rep-$$"

hdiutil attach -nobrowse -noverify -mountpoint $mountPoint $dmgPath

 

appBundle=`find "$mountPoint" -maxdepth 1 -regex ".*\(app\)$"`

echo "Found: $appBundle"

 

workDir=work$$

 

if [[ -d $appBundle ]];

then

    mkdir work$$

    cp -R "$appBundle" "$workDir"

else

    echo "Error copying $appBundle out of disk image"

    hdiutil eject $mountPoint

    exit 1

fi

 

outputBaseName=`basename "$dmgPath"`

outputBaseName="${outputBaseName%.*}"

 

if [[ -f foo.pkg ]]; then rm -f foo.pkg; fi

pkgbuild \

        --root `realpath $workDir` \

        --component-plist rep.plist \

        --install-location /Applications \

        "$outputBaseName.pkg"

 

rm -rf $workDir

 

hdiutil eject $mountPoint

Code for rep.plist

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<array>

<dict>

<key>RootRelativeBundlePath</key>

<string>Bomgar Representative Console - support.example.com.app</string>

<key>BundleHasStrictIdentifier</key>

<true/>

<key>BundleIsRelocatable</key>

<false/>

<key>BundleIsVersionChecked</key>

<false/>

<key>BundleOverwriteAction</key>

<string>upgrade</string>

</dict>

</array>

</plist>

Jump Client Installation with Apple Remote Desktop

  1. From your Bomgar Appliance's /login interface, go to the Configuration > Jump Clients page.
  2. In the Jump Client Mass Deployment Wizard, be sure to check the option Attempt an Elevated Install if the Client Supports It. It is also recommended to check Start Customer Client Minimized When Session Is Started for a truly silent install. You can set all other options to your specifications. Click Create.
  3. Select Mac OS® X (Intel®) as your platform and click Download/Install. Save the installer package to a location that you can access from Apple Remote Desktop.

The following steps occur in Automator.

  1. In Automator, create a workflow. This workflow will contain three actions.
    • Get Specified Finder Items
      1. In this action, add the Jump Client installer package (bomgar-scc-{uid}.dmg).
    • Copy Items to Computers
      1. This action is available only if you have Apple Remote Desktop installed. It determines which computers you are allowed to install to.
      2. Click Update to show all of the computers you can manage.
      3. Check the computers to which you wish to deploy the Bomgar Jump Client.
      4. Set Destination to Other, and specify /var/root.

        Note: You can specify another location if necessary, as long as the script in the next action is able to find this location on all remote systems.

      5. You can set all other options to your specifications.
    • Execute New UNIX Task
      1. Create a name for this task.
      2. In the text area, paste the following script, replacing {uid} with the unique identifier in the Jump Client installer file name:

#!/bin/bash

hdiutil attach -mountpoint /Volumes/foobar /var/root/bomgar-scc-{uid}.dmg

 

'/Volumes/foobar/Double-Click To Start Support Session.app/Contents/MacOS/sdcust'

      1. If you have allowed override of any Jump Client fields, you can append the desired command line parameters to the end of the script above.
      2. Enter root as the user name.
  1. Save the workflow and click the Run button.
  2. While the Jump Client is installing, a splash screen will appear on the remote systems, and a Bomgar icon will briefly appear in the dock. If you did not check Start Customer Client Minimized When Session Is Started, then the customer client will momentarily appear as the Jump Client makes its first connection; it will then disappear.
  3. The Jump Client is now installed and appears in the menu bar.
  4. After a short interval, refresh the Jump Client interface in the representative console to see the Jump Client. As with all Jump Clients, you must have permission to access this Jump Client to see it in your list.