

SoftwareUpdateCheck.sh list the software updates that may be fetched thorught “Software Update...”. Since the Adobe Flash-plugin has seen som many security issues for quite some time, there is an option, -f, that shows if there is a new Flash-plugin available.
Typical user of this script are all those who no longer is running their machines as an admin-user and thus no longer get the information about software updates (from Apple). Although you may run it in a Terminal-window, it's intended to be run together with GeekTool and display the output on the desktop.
The script checks for software updates every 6 houres and updates itself every two weeks. If open_ports.sh is running on the machine, SoftwareUpdateCheck.sh use the data generated by open_ports.sh. You typically have GeekTool run every 15 minutes.
If no updates are available, it looks like this:
| Options: | |
| -f | Shows the status of the Adobe Flash plugin |
| -u | Update the scriptet. Since it's located in /usr/bin you need to be root to do this |
| -t | Forceful creation of data |
| -h | Help. Shows this text |
Example from Terminal.app:$ SoftwareUpdateCheck.sh
Hostname: paravel.cs.lth.se (130.235.16.211) Running: Mac OS X 10.6.7 Uptime: 4 days
Software update check performed at: 9 Maj 10:31
No system software updates found
root: if you are an ordinary user, type su adminanvändarnamn and then sudo -i; if you are an admin-user just type sudo -ichmod 755 SoftwareUpdateCheck_install.sh./SoftwareUpdateCheck_install.shSoftwareUpdateCheck.sh
The script is now running and will automatically launch after a reboot!
Put SoftwareUpdateCheck.sh in /usr/bin and se.lth.cs.softwareupdatecheck.plist in /Library/LaunchDaemons.
The, start (as root) tha letter with launchctl:launchctl load /Library/LaunchDaemons/se.lth.cs.softwareupdatecheck.plist(make sure the file is owned by root and has access rights
launchctl start se.lth.cs.softwareupdatecheck644)
The script will automatically update itself every two weeks (14 days) but you may do it manually as well:
as root in a terminal-shell, type:SoftwareUpdateCheck.sh -u
It will then fetch the latest version of the script and install it (if it is different than the version you have installed – otherwise it will tell you).
Alternatively you may do this by yourself as root (make sure you have a working Internet connection, though):curl fileadmin.cs.lth.se/cs/Personal/Peter_Moller/scripts/SoftwareUpdateCheck.sh > /usr/bin/SoftwareUpdateCheck.sh
chmod 755 /bin/SoftwareUpdateCheck.sh
/usr/bin: | |
SoftwareUpdateCheck.sh | The script that is being used both to gather data and display them |
/Library/LaunchDaemons: | |
se.lth.cs.softwareupdatecheck.plist | Control-script for launchd; makes open_ports.sh run every 900 second to gather data |
/tmp: | |
swu.temp | Data file containing the available updates (from softwareupdate). |
ExternIP.txt | The external IP-address of the computer |
Frågor om innehållet: Peter Möller
Webbtekniska frågor: webmaster@lth.se
Senast uppdaterad: 2011-05-19