This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Block the user from being able to see our trickery | |
## Define the name and path to the LaunchAgent plist | |
PLIST="/Library/LaunchAgents/com.LockLoginScreen.plist" | |
## set the icon | |
swuIcon="<set to your ICON for use on lock screen if you want>" | |
## Define the text for the xml plist file | |
LAgentCore="<?xml version=\"1.0\" encoding=\"UTF-8\"?> | |
<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TODAY=`date +"%Y-%m-%d"` | |
if [[ ! -d "/Library/Application Support/JAMF/Receipts" ]]; then | |
mkdir /Library/Application\ Support/JAMF/Receipts | |
fi | |
touch /Library/Application\ Support/JAMF/Receipts/$modelName_Imaged_$TODAY.pkg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Enable Location Services to set time based on location | |
/bin/launchctl unload /System/Library/LaunchDaemons/com.apple.locationd.plist | |
uuid=`ioreg -rd1 -c IOPlatformExpertDevice | awk -F'"' '/IOPlatformUUID/{print $4}'` | |
/usr/bin/defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd.$uuid \ | |
LocationServicesEnabled -int 1 | |
/usr/sbin/chown -R _locationd:_locationd /var/db/locationd | |
/bin/launchctl load /System/Library/LaunchDaemons/com.apple.locationd.plist | |
# set time zone automatically using current location |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################################## | |
# /etc/authorization changes | |
########################################## | |
security authorizationdb write system.preferences allow | |
security authorizationdb write system.preferences.datetime allow | |
security authorizationdb write system.preferences.printing allow | |
security authorizationdb write system.preferences.energysaver allow | |
security authorizationdb write system.preferences.network allow | |
security authorizationdb write system.services.systemconfiguration.network allow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# check for jamf binary | |
/bin/echo "Checking for JAMF binary" | |
/bin/date | |
if [[ "$jamf_binary" == "" ]] && [[ -e "/usr/sbin/jamf" ]] && [[ ! -e "/usr/local/bin/jamf" ]]; then | |
jamf_binary="/usr/sbin/jamf" | |
elif [[ "$jamf_binary" == "" ]] && [[ ! -e "/usr/sbin/jamf" ]] && [[ -e "/usr/local/bin/jamf" ]]; then | |
jamf_binary="/usr/local/bin/jamf" | |
elif [[ "$jamf_binary" == "" ]] && [[ -e "/usr/sbin/jamf" ]] && [[ -e "/usr/local/bin/jamf" ]]; then | |
jamf_binary="/usr/local/bin/jamf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.yourcompany.postimage</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/path/to/your/scripts/postimage_10.11.5.sh</string> | |
</array> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loggedInUser=`python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "\n");'` | |
view rawcontents.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
homeDir=`dscl . read /Users/$loggedInUser NFSHomeDirectory | awk '{ print $2 }'` | |
homeSize=`du -hs ${homeDir}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defaults write /Library/IT_Data/com.mycompany.homesize.plist HomeFolderSize -string "${homeSize}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [[ -e ${dataFile} ]]; then | |
homeSize=`defaults read ${dataFile} HomeFolderSize` | |
fi |