#!/bin/bash ################################################################################################### # Script Name: install_Zoom-ForIT.sh # By: Zack Thompson / Created: 5/25/2018 # Version: 1.0 / Updated: 5/25/2018 / By: ZT # # Description: This script installs the Zoom package with a configuration .plist. # ################################################################################################### echo "***** Install Zoom-ForIT Process: START *****" ################################################## # Define Variables # Set working directory pkgDir=$(/usr/bin/dirname "${0}") # Get the filename of the .dmg file ZoomPKG=$(/bin/ls "${pkgDir}" | /usr/bin/grep .pkg) # Set the configuration .plist details configuration=" nogoogle 1 nofacebook 1 ZDisableVideo ZAutoJoinVoip ZDualMonitorOn ZAutoSSOLogin ZSSOHost yourVanityURL.zoom.us ZAutoFullScreenWhenViewShare ZAutoFitWhenViewShare ZUse720PByDefault ZRemoteControlAllApp ZHideNoVideoUser " ################################################## # Bits staged... # Check the installation target. if [[ $3 != "/" ]]; then echo "ERROR: Target disk is not the startup disk." echo "***** Install Zoom-ForIT process: FAILED *****" exit 1 fi echo "Installing ${ZoomPKG}..." exitResult=$(/usr/sbin/installer -dumplog -verbose -pkg "${pkgDir}/${ZoomPKG}" -allowUntrusted -target /) exitCode=$? if [[ $exitCode != 0 ]]; then echo "Installation FAILED!" echo "Reason: ${exitResult}" echo "Exit Code: ${exitCode}" echo "***** Install Zoom-ForIT process: FAILED *****" exit 2 else echo "${2} has been installed!" echo "Installing custom configuration details..." /usr/bin/printf "${configuration}" > "${pkgDir}/us.zoom.config.plist" /bin/mv "${pkgDir}/us.zoom.config.plist" "/Library/Preferences/us.zoom.config.plist" fi echo "***** Install Zoom-ForIT Process: COMPLETE *****" exit 0