aptchecker
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| aptchecker [2006/11/09 19:04] – old revision restored andi | aptchecker [2006/11/13 13:50] (current) – old revision restored andi | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== APT-Checker ====== | ||
| + | |||
| + | This script is meant to be run from ''/ | ||
| + | |||
| + | <code bash> | ||
| + | #!/bin/sh | ||
| + | |||
| + | HOSTNAME=`hostname` | ||
| + | MAILTO=" | ||
| + | MAILFROM=" | ||
| + | |||
| + | apt-get update >/ | ||
| + | |||
| + | NEWPACKAGES=`apt-get --print-uris -qq -y upgrade 2>/ | ||
| + | |||
| + | if [ " | ||
| + | then | ||
| + | mail -a "From: $MAILFROM" | ||
| + | There are new Packages available for $HOSTNAME: | ||
| + | |||
| + | $NEWPACKAGES | ||
| + | |||
| + | please run: | ||
| + | ssh root@$HOSTNAME ' | ||
| + | |||
| + | EOF | ||
| + | fi | ||
| + | |||
| + | exit 0; | ||
| + | </ | ||
