Skip to main content

How to make a Script for App Deployment on Mac OS (using 8x8 work)

πŸ“¦ 8x8 Work App Deployment via Script (macOS)

This guide walks you through how to deploy the 8x8 WorkΒ app on macOS using a custom bash script. This is ideal for environments managed via MerakiΒ or other MDM tools.


πŸš€ Deployment Script Overview

The following script will:

    Remove any existing version of 8x8 Work.app Download the latest installer from 8x8's official server Mount the DMG Copy the app into /Applications Unmount the DMG Log each step into /tmp/8x8_install_status.log
    #!/bin/bash
    
    APP_PATH="/Applications/8x8 Work.app"
    LOG_FILE="/tmp/8x8_install_status.log"
    
    echo "Starting 8x8 installation status log" > "$LOG_FILE"
    date >> "$LOG_FILE"
    
    if [ -d "$APP_PATH" ]; then
      echo "Removing existing 8x8 Work.app" | tee -a "$LOG_FILE"
      rm -rf "$APP_PATH"
    fi
    
    if curl -L -o /tmp/8x8Installer.dmg https://work-desktop-assets.8x8.com/prod-publish/ga/work-dmg-v8.21.3-1.dmg; then
      echo "Download complete" | tee -a "$LOG_FILE"
    else
      echo "Download failed" | tee -a "$LOG_FILE"
      exit 1
    fi
    
    if hdiutil attach /tmp/8x8Installer.dmg; then
      echo "Disk image mounted" | tee -a "$LOG_FILE"
    else
      echo "Failed to mount disk image" | tee -a "$LOG_FILE"
      exit 1
    fi
    
    if ditto "/Volumes/8x8 Work/8x8 Work.app" "$APP_PATH"; then
      echo "Application copied to /Applications" | tee -a "$LOG_FILE"
    else
      echo "Failed to copy application" | tee -a "$LOG_FILE"
      exit 1
    fi
    
    if hdiutil detach "/Volumes/8x8 Work"; then
      echo "Disk image unmounted" | tee -a "$LOG_FILE"
    else
      echo "Failed to unmount disk image" | tee -a "$LOG_FILE"
      exit 1
    fi
    
    if [ -d "$APP_PATH" ]; then
      echo "8x8 Work.app installed successfully in /Applications." | tee -a "$LOG_FILE"
    else
      echo "Installation failed" | tee -a "$LOG_FILE"
      exit 1
    fi
    

    πŸ“– How to Check Installation Logs

    The script logs its progress in a plain text file located at /tmp/8x8_install_status.log.

    πŸ” View Log Contents

    cat /tmp/8x8_install_status.log

    πŸ“œ View Log with Paging

    less /tmp/8x8_install_status.log

    πŸ‘€ Follow the Log in Real Time

    tail -f /tmp/8x8_install_status.log

    ❗ Search for Errors

    grep "Failed" /tmp/8x8_install_status.log

    βœ… You’re now equipped to deploy and verify the 8x8 Work app installation on macOS systems using a scripted process. Happy deploying!