I wrote a script to update the ubuntu packages and to send me an email, however, the output of what was updated and restarted the services is not sent by email or not made. I tried to start the update from the command line and output it to a text file, but nothing is written to the text file. Any ideas?
TEMP="/tmp/upgrade.txt" MAIL_ADDR=" user@example.com " cat /dev/null > $TEMP apt-get update && apt-get upgrade --assume-yes > $TEMP mail -s "Upgrade for $HOSTNAME" $MAIL_ADDR < $TEMP rm $TEMP
source share