NOTE: OK before I show you this I HIGHLY recommend you set this up on a new private twitter feed that only your normal twitter user can see, this means the whole world can not see which packages need updating and any potential security exploits you may have.
The main reason for doing this is that I read twitter everyday and also mange a fair few debian and ubuntu servers. So its a convenient way to see which server needs updating in something I’m already reading.
So heres how I currently do it,
Depending on your system you may need to install curl:
sudo su -p (su or login as root)
apt-get install curl
vi /etc/cron.daily/cron-apt-twitter
Add this to the file change the <TWITTER_USER> and <TWITTER_PASS> for your new twitter account.
#!/bin/bash
#
# Cron Script – /etc/cron.daily
#
# Check for system updates and update Twitter status with summarydistro=”Debian `cat /etc/debian_version` on `cat /etc/hostname`”
upgrades=”`apt-get -s upgrade | grep upgraded | grep -v following`”
status=”$distro needs: $upgrades”# Paste status to twitter
curl –basic –user <TWITTER_USER>:<TWITTER_PASS> –data status=”$status” https://twitter.com/statuses/update.xml
Save and quit. Now chmod the file so its executable.
chmod 700 /etc/cron.daily/apt-cron-twitter
Now your all set. Everyday you’ll get an update on twitter with a summary of updates.





no comment untill now