The following Custom Script will update a Mac OS X system using Apple Software Update. It will then reboot the machine IF nobody is logged into the Console.
REMEXEC0=/usr/sbin/softwareupdate -ia ; if [[ `stat -f '%Su' /dev/console` == \"root\" ]] ; then /sbin/shutdown -r now ; fi
We use a Mac OS X Server in order to provide Apple Software Update Server (SUS) local to our network. This is significantly faster than each system going to Apple's CDN to deliver patches. We define the Apple SUS by using a Mac OS X Profile installed with the LDMS Mac Agent. See How to use the Software Update service in OS X Server to update your Mac clients - Apple Support for information on configuring Macs to use a local SUS.
That's a cool script, thanks for sharing!
Retrieving data ...