sudo apt-get update
sudo apt-get -u upgrade --assume-no
RETVAL=$?
## return 0   -> nothing to do
## return 1   -> upgrades available
## return 100 -> dpkg frontend is currently locked
if [ $RETVAL -eq 1 ]; then
	sudo apt-get upgrade -y
	sudo apt-get clean
	sudo apt-get autoremove -y
	sudo reboot
else
        echo "curently nothing to do"
        exit 0
fi
