aboutsummaryrefslogtreecommitdiff
path: root/contrib/auto-naming
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2007-10-27 20:24:33 +0000
committerPeter Palfrader <peter@palfrader.org>2007-10-27 20:24:33 +0000
commit5e6fc79a8893e002cf718d042c86354c908a3d44 (patch)
treeefc327b5a20e32017a63e9070273294354de8f71 /contrib/auto-naming
parentad37ad75081fb0034d221bfbdf3471269802ad41 (diff)
downloadtor-5e6fc79a8893e002cf718d042c86354c908a3d44.tar
tor-5e6fc79a8893e002cf718d042c86354c908a3d44.tar.gz
Add sample makefile and crontab
svn:r12232
Diffstat (limited to 'contrib/auto-naming')
-rw-r--r--contrib/auto-naming/Sample-Makefile20
-rw-r--r--contrib/auto-naming/Sample-crontab3
2 files changed, 23 insertions, 0 deletions
diff --git a/contrib/auto-naming/Sample-Makefile b/contrib/auto-naming/Sample-Makefile
new file mode 100644
index 000000000..e3e0351df
--- /dev/null
+++ b/contrib/auto-naming/Sample-Makefile
@@ -0,0 +1,20 @@
+
+all: ../approved-routers
+
+update:
+ wget -q -O - http://tor.noreply.org/tor/status-vote/current/consensus | \
+ ./process-consensus
+
+.PHONY: approved-routers-auto
+approved-routers-auto:
+ ./build-approved-routers > "$@"
+
+.INTERMEDIATE: approved-routers
+approved-routers: approved-routers-auto /etc/tor/approved-routers
+ cat $^ > "$@"
+
+../approved-routers: approved-routers
+ if ! diff -q "$<" "$@"; then \
+ mv "$<" "$@" &&\
+ (! [ -e /var/run/tor/tor.pid ] || kill -HUP `cat /var/run/tor/tor.pid`) ; \
+ fi
diff --git a/contrib/auto-naming/Sample-crontab b/contrib/auto-naming/Sample-crontab
new file mode 100644
index 000000000..b50c07bb8
--- /dev/null
+++ b/contrib/auto-naming/Sample-crontab
@@ -0,0 +1,3 @@
+MAILTO=admin
+# cronjob for tor naming
+23 * * * * make -s -C auto-naming update && make -s -C auto-naming