Setup-Your-Mac icon indicating copy to clipboard operation
Setup-Your-Mac copied to clipboard

Plist to pull data from for Jamf EA's post deployment

Open mattdjerome opened this issue 11 months ago • 1 comments

I've been trying out a few computer setup tools and one thing that something like Setup manager has over SYM is the creation of a plist during setup. I took a shot some basic stuff and here's what I did which works well...

#!/bin/bash

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Create a plist to store values
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
date=$(date +%Y-%m-%d)
plistLocation="/Library/Preferences/com.setupYourMac.plist"
if [[ -e $plistLocation ]]; then
	updateScriptLog "plist already exists, continuing"
else
	updateScriptLog "plist does not exist, creating plist"
	touch $plistLocation
	updateScriptLog "plist created at ${plistLocation}"
fi

defaults write $plistLocation scriptVersion $scriptVersion
defaults write $plistLocation osAtBuid $osVersion
sudo defaults write $plistLocation runDate $date

mattdjerome avatar May 08 '25 16:05 mattdjerome

Thanks for the suggestion @mattdjerome; we're using the Best option to leave and retrieve breadcrumbs outside of SYM.

dan-snelson avatar May 08 '25 16:05 dan-snelson