[or-cvs] r20021: {torflow} Try to use PidFile to kill tor. (in torflow/trunk/NetworkScanners/BwAuthority: . data/scanner.1 data/scanner.2 data/scanner.3 data/scanner.4)
mikeperry at seul.org
mikeperry at seul.org
Wed Jul 15 00:31:57 UTC 2009
Author: mikeperry
Date: 2009-07-14 20:31:57 -0400 (Tue, 14 Jul 2009)
New Revision: 20021
Modified:
torflow/trunk/NetworkScanners/BwAuthority/data/scanner.1/torrc
torflow/trunk/NetworkScanners/BwAuthority/data/scanner.2/torrc
torflow/trunk/NetworkScanners/BwAuthority/data/scanner.3/torrc
torflow/trunk/NetworkScanners/BwAuthority/data/scanner.4/torrc
torflow/trunk/NetworkScanners/BwAuthority/run_scan.sh
Log:
Try to use PidFile to kill tor.
Modified: torflow/trunk/NetworkScanners/BwAuthority/data/scanner.1/torrc
===================================================================
--- torflow/trunk/NetworkScanners/BwAuthority/data/scanner.1/torrc 2009-07-15 00:25:19 UTC (rev 20020)
+++ torflow/trunk/NetworkScanners/BwAuthority/data/scanner.1/torrc 2009-07-15 00:31:57 UTC (rev 20021)
@@ -3,10 +3,7 @@
ControlPort 9111
SafeLogging 0
Log notice file ./data/scanner.1/tor.log
-FetchUselessDescriptors 1
DataDirectory ./data/scanner.1/tor-data
+PidFile ./data/scanner.1/tor.pid
CookieAuthentication 1
-
-# XXX: This should be for test scans only. Our timeout values must match the
-# normal Tor clients.
-SocksTimeout 45
+FetchUselessDescriptors 1
Modified: torflow/trunk/NetworkScanners/BwAuthority/data/scanner.2/torrc
===================================================================
--- torflow/trunk/NetworkScanners/BwAuthority/data/scanner.2/torrc 2009-07-15 00:25:19 UTC (rev 20020)
+++ torflow/trunk/NetworkScanners/BwAuthority/data/scanner.2/torrc 2009-07-15 00:31:57 UTC (rev 20021)
@@ -3,10 +3,7 @@
ControlPort 9121
SafeLogging 0
Log notice file ./data/scanner.2/tor.log
-FetchUselessDescriptors 1
DataDirectory ./data/scanner.2/tor-data
+PidFile ./data/scanner.2/tor.pid
CookieAuthentication 1
-
-# XXX: This should be for test scans only. Our timeout values must match the
-# normal Tor clients.
-SocksTimeout 45
+FetchUselessDescriptors 1
Modified: torflow/trunk/NetworkScanners/BwAuthority/data/scanner.3/torrc
===================================================================
--- torflow/trunk/NetworkScanners/BwAuthority/data/scanner.3/torrc 2009-07-15 00:25:19 UTC (rev 20020)
+++ torflow/trunk/NetworkScanners/BwAuthority/data/scanner.3/torrc 2009-07-15 00:31:57 UTC (rev 20021)
@@ -3,6 +3,7 @@
ControlPort 9131
SafeLogging 0
Log notice file ./data/scanner.3/tor.log
-FetchUselessDescriptors 1
DataDirectory ./data/scanner.3/tor-data
+PidFile ./data/scanner.3/tor.pid
CookieAuthentication 1
+FetchUselessDescriptors 1
Modified: torflow/trunk/NetworkScanners/BwAuthority/data/scanner.4/torrc
===================================================================
--- torflow/trunk/NetworkScanners/BwAuthority/data/scanner.4/torrc 2009-07-15 00:25:19 UTC (rev 20020)
+++ torflow/trunk/NetworkScanners/BwAuthority/data/scanner.4/torrc 2009-07-15 00:31:57 UTC (rev 20021)
@@ -3,6 +3,7 @@
ControlPort 9141
SafeLogging 0
Log notice file ./data/scanner.4/tor.log
-FetchUselessDescriptors 1
DataDirectory ./data/scanner.4/tor-data
+PidFile ./data/scanner.4/tor.pid
CookieAuthentication 1
+FetchUselessDescriptors 1
Modified: torflow/trunk/NetworkScanners/BwAuthority/run_scan.sh
===================================================================
--- torflow/trunk/NetworkScanners/BwAuthority/run_scan.sh 2009-07-15 00:25:19 UTC (rev 20020)
+++ torflow/trunk/NetworkScanners/BwAuthority/run_scan.sh 2009-07-15 00:31:57 UTC (rev 20021)
@@ -12,10 +12,18 @@
# NOTE: You may want to remove this line if these are not the only
# tors run by this user:
killall bwauthority.py
-killall tor && sleep 5 && killall -9 tor
for i in data/scanner.*
do
+ if [ -f "$i/tor.pid" ]; then
+ PID=`cat $i/tor.pid`
+ kill $PID && sleep 2 && kill -9 $PID
+ rm "$i/tor.pid"
+ fi
+done
+
+for i in data/scanner.*
+do
rm $i/scan-data/*
done
More information about the tor-commits
mailing list