X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=bin%2Fupdate-system;h=52c126000af70cd8ee0d10b50370a5e02f3065c2;hb=0ec3e6e71b45b565ca3da8d06010ad736588395f;hp=f3ebd48ce1b322c588e3f679590fd722da9b5f82;hpb=c13c89fdf02d9946f58f2a6b4a7138d60bed9f70;p=clearscm.git diff --git a/bin/update-system b/bin/update-system index f3ebd48..52c1260 100755 --- a/bin/update-system +++ b/bin/update-system @@ -6,7 +6,7 @@ tmpfile=/tmp/update-system.list apt-get update -y > /dev/null 2>&1 -apt-gt list --upgradeable > $tmpfile +apt list --upgradeable > $tmpfile 2> /dev/null uptodate=$(grep -v "^Listing" $tmpfile | wc -l) if [ $uptodate -ne 0 ]; then @@ -17,5 +17,7 @@ if [ $uptodate -ne 0 ]; then echo "$(date): Updated $HOSTNAME" >> $logfile else + rm $tmpfile + echo "$(date): No updates for $HOSTNAME" >> $logfile fi