User Tools

Site Tools


bash:apt_notifier

This is an old revision of the document!


aptnotifier.sh
#!/bin/bash
#
# Cron Script - run from /etc/crontab or /etc/cron.daily
#
# Runs "apt-get update" and prints the output of a simulated
# dist-upgrade if new packages are found.
 
apt-get update 2>&1 > /dev/null
if [[ "`apt-get --simulate dist-upgrade 2>&1 | grep Inst | wc -l`" != "0" ]]; then
        apt-get --simulate dist-upgrade
fi
bash/apt_notifier.1387269400.txt.gz · Last modified: 2015/08/15 22:56 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki