Closed mpanighetti closed 5 years ago
Are you sure this works with a config profile?
I don't think deploying a profile will actually update the value in the plist,
maybe use python -c "from Foundation import CFPreferencesCopyAppValue; print CFPreferencesCopyAppValue('MAX_DEFERRAL_TIME', '$PLIST')"
instead of defaults read...
?
It’s worked in my testing, though there might be a delay before the system starts picking up the custom value; killing cfprefsd
can force the system to recognize the new setting sooner for testing purposes.
EDIT: Spoke too soon, defaults read
definitely isn't reading configuration profile values. I'll implement the python version of the check as that seems to be working more reliably. Thanks for flagging!
$MAX_DEFERRAL_TIME
and$SKIP_DEFERRAL
settings defined by plist attributes, or if undefined, reverts to script default (allows for managing deferral periods via configuration profile rather than making the change in the script and repackaging)UpperCamelCase
for CFPreferences,ALL_CAPS_WITH_UNDERSCORES
for variables)