* ron script for check updated packages
[lab.git] / cron.daily / apt-cron
diff --git a/cron.daily/apt-cron b/cron.daily/apt-cron
new file mode 100755 (executable)
index 0000000..ab151a7
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+/usr/bin/aptitude update > /dev/null 2>&1
+
+if [ `/usr/bin/aptitude -s -y safe-upgrade | /bin/grep -c ^0` -eq 0 ]; then
+    /usr/bin/aptitude -s -y safe-upgrade | /bin/grep '^[ T0-9]'
+fi