vi /usr/local/bin/update.sh | ||
#!/bin/bash |
||
chmod +x /usr/local/bin/update.sh | ||
# update | ||
vi /usr/local/bin/notupdate.sh | ||
apt-get -s -qq dist-upgrade apt list --upgradable apt-get -u upgrade --assume-no apt-get -u update --assume-no apt-get --just-print upgrade 2>&1 | perl -ne 'if (/Inst\s([\w,\-,\d,\.,~,:,\+]+)\s\[([\w,\-,\d,\.,~,:,\+]+)\]\s\(([\w,\-,\d,\.,~,:,\+]+)\)? /i) {print "PROGRAM: $1 INSTALLED: $2 AVAILABLE: $3\n"}' |
||
chmod +x /usr/local/bin/notupdate.sh | ||
crontab -e | ||
0 14-21 * * * /usr/local/bin/notupdate.sh | ||
service cron reload | ||
# purge-old-kernels --keep 2 |