Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simulate system up to date debian
#!/bin/bash
#Cron Script Run from /etc/crontab.daily
#runs apt-get update and prints the output of a simulated
#dist-upgrade if new packages are found, also you can add a line in crontab with a pipe
#to run a mail.
if [[`apt-get update 2>&1|grep Get` ]]; then
if [[`apt-get --simulate dist-upgrade 2>&1|grep Inst` ]];then
apt-get --simulate dist-upgrade
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.