tAdd example configurations; improve makefiles - tordam - A library for peer discovery inside the Tor network
 (HTM) git clone https://git.parazyd.org/tordam
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 24156de26fb67ba8a61df74c94c7796ff98ebad2
 (DIR) parent b98456ed265504cce1b763a18f15c9282d6c53e6
 (HTM) Author: parazyd <parazyd@dyne.org>
       Date:   Fri,  8 Dec 2017 13:23:57 +0100
       
       Add example configurations; improve makefiles
       
       Diffstat:
         A Makefile                            |      14 ++++++++++++++
         M README.md                           |       7 ++++---
         A contrib/redis.conf                  |      20 ++++++++++++++++++++
         A contrib/torrc                       |      16 ++++++++++++++++
         M python/Makefile                     |       9 +++++++++
       
       5 files changed, 63 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/Makefile b/Makefile
       t@@ -0,0 +1,14 @@
       +# See LICENSE file for copyright and license details.
       +
       +PREFIX ?= /usr/local
       +
       +all:
       +        @echo 'Run "make install" to install into $(DESTDIR)$(PREFIX)'
       +
       +install:
       +        @make -C python install
       +
       +uninstall:
       +        @make -C python uninstall
       +
       +.PHONY: all install uninstall
 (DIR) diff --git a/README.md b/README.md
       t@@ -29,9 +29,8 @@ The Go dependencies should be pulled in with `go get`. You can install
        `stem` possibly with your package manager, or download it from the
        website itself.
        
       -To install the Python scripts, go to the directory where go has
       -downloaded tor-dam, enter the `python` directory and run `make install`
       -as root.
       +To install everything else, go to the directory where go has downloaded
       +tor-dam and run `make install` as root.
        
        External software dependendies include `redis` and `tor`. You can
        retrieve them using your package manager.
       t@@ -41,3 +40,5 @@ CookieAuthentication or a password, for stem to authenticate and be able
        to create hidden services and retrieve hidden service descriptors.
        
        Redis is our storage backend where information about nodes is held.
       +
       +Working configurations are provided in the `contrib` directory.
 (DIR) diff --git a/contrib/redis.conf b/contrib/redis.conf
       t@@ -0,0 +1,20 @@
       +#
       +# Redis configuration for tor-dam
       +#
       +
       +daemonize yes
       +
       +bind 127.0.0.1
       +port 6379
       +
       +databases 1
       +dbfilename decode-dir.rdb
       +
       +save 900 1
       +save 300 10
       +save 60  10000
       +
       +rdbcompression yes
       +rdbchecksum yes
       +
       +stop-writes-on-bgsave-error yes
 (DIR) diff --git a/contrib/torrc b/contrib/torrc
       t@@ -0,0 +1,16 @@
       +#
       +# Minimal torrc so tor will work out of the box
       +#
       +
       +User tor
       +PIDFile /var/run/tor/tor.pid
       +Log notice syslog
       +DataDirectory /var/lib/tor/data
       +
       +ControlPort 9051
       +CookieAuthentication 1
       +HashedControlPassword 16:6091EDA9F3F5F8EB60C8423561CB8C46B3CCF033E88FEACA1FC8BDBB9A
       +
       +SocksPort 9050
       +
       +ClientRejectInternalAddresses 1
 (DIR) diff --git a/python/Makefile b/python/Makefile
       t@@ -13,3 +13,12 @@ install:
                @echo 'Installing scripts to $(DESTDIR)$(PREFIX)/bin'
                mkdir -p $(DESTDIR)$(PREFIX)/bin
                cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin
       +        cd $(DESTDIR)$(PREFIX)/bin
       +        chmod 755 $(BIN)
       +
       +uninstall:
       +        @echo 'Uninstalling scripts from $(DESTDIR)$(PREFIX)/bin'
       +        cd $(DESTDIR)$(PREFIX)/bin
       +        rm -f $(BIN)
       +
       +.PHONY: all install uninstall