[tor-commits] [check/master] Add setup instructions to the readme.

arlo at torproject.org arlo at torproject.org
Sat Oct 26 21:40:29 UTC 2013


commit d9d7cbee7f1fed27f1fc3f75cb7e6ee827d6ad8a
Author: Arlo Breault <arlolra at gmail.com>
Date:   Sat Oct 26 14:39:32 2013 -0700

    Add setup instructions to the readme.
    
    Assumes a base dir of /opt/check
---
 Makefile           |    8 ++++----
 Readme.md          |   19 +++++++++++++++++++
 scripts/cpexits.sh |    7 ++-----
 3 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile
index a9c6cbc..cb2a3e0 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 SHELL := /bin/bash
 
-start: data/exit-policies data/langs i18n
+start: exits i18n
 	@./check
 
 rsync_server = metrics.torproject.org
@@ -30,7 +30,7 @@ data/exit-addresses: data/exit-lists/
 	@rsync -avz $(rsync_server)::$(exit_lists_dir) --delete ./data/exit-lists/
 	@echo Exit lists written
 
-data/exit-policies: data/consensus data/exit-addresses data/cached-descriptors
+exits: data/consensus data/exit-addresses data/cached-descriptors
 	@echo Generating exit-policies file
 	@python scripts/exitips.py
 	@echo Done
@@ -68,7 +68,7 @@ bench: build
 profile: build
 	go test -cpuprofile ../../cpu.prof -memprofile ../../mem.prof -benchtime 40s -bench "$(filter)"
 
-i18n: locale/
+i18n: locale/ data/langs
 
 locale/:
 	rm -rf locale
@@ -88,4 +88,4 @@ install: build
 	cp scripts/check.init /etc/init.d/check
 	update-rc.d check defaults
 
-.PHONY: start build i18n test bench cover profile descriptors install
\ No newline at end of file
+.PHONY: start build i18n exits test bench cover profile descriptors install
\ No newline at end of file
diff --git a/Readme.md b/Readme.md
index 90632a4..2a58ac2 100644
--- a/Readme.md
+++ b/Readme.md
@@ -44,6 +44,25 @@ The data that `make start` pulls in will quickly become stale. What you want to
 
 Then setup a cron job to run a script like `scripts/cpexits.sh` every hour. Setting up TorDNSEL to get the exit addresses is beyond the scope of this readme.
 
+## Setup
+
+Assuming debian, install the dependencies,
+
+    apt-get install git golang gettext python-dateutil python-stem
+		go get github.com/samuel/go-gettext/gettext
+
+The cron job and init script assume a base directory of `/opt/check`.
+
+    git clone https://git.torproject.org/check.git /opt/check
+		cd /opt/check
+		make i18n
+		make exits
+		make install
+
+Then you start it up,
+
+    /etc/init.d/check start
+
 ## Capacity planning
 
 > 54.7 requests/sec - 47.0 kB/second - 879 B/request  
diff --git a/scripts/cpexits.sh b/scripts/cpexits.sh
index 109ccfc..fb9da8e 100755
--- a/scripts/cpexits.sh
+++ b/scripts/cpexits.sh
@@ -1,9 +1,6 @@
 #!/usr/bin/env bash
 
-HOME=/home/arlo
-GIT=$HOME/git
-TAR=$HOME/tar
-CHECK=$GIT/check
+CHECK=/opt/check
 TORDATA=/srv/tor
 DNSEL=/srv/tordnsel.torproject.org/state
 NOW=$(date +"%Y-%m-%d-%H-%M-%S")
@@ -13,5 +10,5 @@ cp $TORDATA/cached-consensus $CHECK/data/consensuses/$NOW-consensus
 cat $TORDATA/cached-descriptors $TORDATA/cached-descriptors.new > $CHECK/data/cached-descriptors
 
 cd $CHECK
-PYTHONPATH=$GIT/stem:$TAR/six:$TAR/dateutil scripts/exitips.py -n 1
+scripts/exitips.py -n 1
 kill -s SIGUSR2 `cat check.pid`



More information about the tor-commits mailing list