#!/bin/bash # get necessary plists appInfoPlistName="/Library/DesktopCentral_Agent/SystemData/dcconfig_data.plist" # make this computer imaging ready /usr/libexec/PlistBuddy -c "Delete :ImageDetectTime" $appInfoPlistName 2>/dev/null /usr/libexec/PlistBuddy -c "Delete :ImagedComputer" $appInfoPlistName 2>/dev/null /usr/libexec/PlistBuddy -c "Delete :ImageWaitDays" $appInfoPlistName 2>/dev/null /usr/libexec/PlistBuddy -c "Delete :StopAgentReporting" $appInfoPlistName 2>/dev/null /usr/libexec/PlistBuddy -c "Delete :ImageRetryCount" $appInfoPlistName 2>/dev/null /usr/libexec/PlistBuddy -c "Delete :ImageReportInterval" $appInfoPlistName 2>/dev/null /usr/libexec/PlistBuddy -c "Delete :ImageReportTime" $appInfoPlistName 2>/dev/null /usr/libexec/PlistBuddy -c "Add :ImagedComputer string Yes" $appInfoPlistName 2>/dev/null exitCode=$? if [ "$exitCode" = "0" ]; then killall kill dcondemand killall kill dcagenttrayicon echo "Successfully executed." else echo $exitCode echo "Failed to set ImagedComputer, Please contact DesktopCentral support." fi exit $exitCode