[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
logrotate email alerts for old versions of Tor
- To: or-talk@xxxxxxxxxxxxx
- Subject: logrotate email alerts for old versions of Tor
- From: Erilenz <erilenz@xxxxxxxxx>
- Date: Fri, 18 Sep 2009 15:39:02 -0400
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: or-talk-outgoing@xxxxxxxx
- Delivered-to: or-talk@xxxxxxxx
- Delivery-date: Fri, 18 Sep 2009 15:32:46 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-disposition; bh=ccctH/B4nGnBdi+O76200etQPlUpALq8qXIvpEB5cRg=; b=oiMWrlKpwSXDCXxboNlUjZHYuEdfGbN9c3s+5KYqaGp72gu/GHOpAXIywZWbrzRALv 6tkwWc8n1SifG7/OgqUj0x9TYm/1pEaNbLRO2bJmhM7Yi6l8zWT38AcJRRah+TBgu7IU cj9PFprmf+6TRN/l1hLioBUCtJsEi8ibbSqEk=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-disposition; b=ZuRkhQez2Loasce0I/fkL+1wvthyp36luFkmcnO82ZpTiiAL6+yKLQfnH8V0bhHaZi CY2ktT6vJ+HF7iEYyn7gvgjyZbb/57YWDQbRkIl+a++1qy8JnRU3v9ROu6/UOLVD2lSR mr9q//wfV0cF+4vB70JGJDiHJmyj5uJEK/Pgc=
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-talk@xxxxxxxxxxxxx
I use the deb.torproject.org repository to install Tor on my Ubuntu box.
On several occasions I've noticed in my Tor log file that it has been
telling me to upgrade for several days, without me noticing. I applied
the following changes to my logrotate config in order to get email
alerts when I need to upgrade Tor. I don't know how portable it is, but
the idea it's self should be portable. I think the root user should get
email alerts when they're running a non-recommended version of Tor.. An
entry in an often unmonitored log isn't enough.
root@server:/etc/logrotate.d# diff -u tor.original tor
--- tor.original 2009-09-18 15:32:16.000000000 -0400
+++ tor 2009-09-17 07:48:25.000000000 -0400
@@ -7,6 +7,9 @@
notifempty
create 0640 debian-tor adm
sharedscripts
+ prerotate
+ if [ "`grep '\[warn\] Please upgrade' /var/log/tor/log`" != "" ]; then echo "Upgrade Tor"|mail -s "Upgrade Tor" root; fi
+ endscript
postrotate
/etc/init.d/tor reload > /dev/null
endscript
--
Erilenz