Created
August 16, 2016 05:35
-
-
Save matthewbodaly/40a5b2b23f2fa81c36fca6c3f1d7645c to your computer and use it in GitHub Desktop.
Ea for figuring out if a restart is needed
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
#!/bin/bash | |
# I could probably do it this way with a little time | |
# https://jamfnation.jamfsoftware.com/discussion.html?id=19323 | |
installAtLogoutItems=$(defaults read /Library/Updates/index.plist InstallAtLogout) | |
printf '<result>' | |
if [ ${#installAtLogoutItems} -le 3 ]; then | |
printf 'No updates pending' | |
else | |
printf "%s" "${installAtLogoutItems:1:${#installAtLogoutItems}--2}" | |
fi | |
printf '</result>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment