r2807 - configs/daniel/desktop/config/chroot_local-includes/usr/local/bin

daniel at alioth.debian.org daniel at alioth.debian.org
Wed Aug 29 09:15:52 UTC 2007


Author: daniel
Date: 2007-08-29 09:15:52 +0000 (Wed, 29 Aug 2007)
New Revision: 2807

Added:
   configs/daniel/desktop/config/chroot_local-includes/usr/local/bin/apt-check
Log:


Added: configs/daniel/desktop/config/chroot_local-includes/usr/local/bin/apt-check
===================================================================
--- configs/daniel/desktop/config/chroot_local-includes/usr/local/bin/apt-check	                        (rev 0)
+++ configs/daniel/desktop/config/chroot_local-includes/usr/local/bin/apt-check	2007-08-29 09:15:52 UTC (rev 2807)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# apt-check.sh - Check for package updates
+#
+# This script is written by Daniel Baumann <daniel at debian.org>
+# and hereby placed in the public domain (no rights reserved).
+
+EMAIL="root"
+
+DATE="`date +%Y-%m-%d`"
+HOSTNAME="`hostname`"
+
+TEMPFILE="`mktemp -t apt-check.XXXXXXXX`"
+
+# Updating package indices
+apt-get update -qq
+
+# Checking package updates
+if [ "`apt-get upgrade -s | grep -c '^Inst'`" -ne "0" ]
+then
+
+cat > "${TEMPFILE}" << EOF
+To: ${EMAIL}
+From: apt-check@${HOSTNAME}
+Subject: Package updates available on ${HOSTNAME} (${DATE})
+
+Dear System Administrator,
+
+the following package updates are available on ${HOSTNAME}. We recommend that you upgrade your system as soon as possible.
+
+`apt-get upgrade -s | grep '^Inst' | sed -e 's/^Inst /\t/g'`
+
+Regards,
+apt-check (the script behind the curtain)
+EOF
+
+	cat "${TEMPFILE}" | /usr/sbin/sendmail -t
+	rm -f "${TEMPFILE}"
+fi


Property changes on: configs/daniel/desktop/config/chroot_local-includes/usr/local/bin/apt-check
___________________________________________________________________
Name: svn:executable
   + *




More information about the debian-live-changes mailing list