]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add sample makefile and crontab
authorPeter Palfrader <peter@palfrader.org>
Sat, 27 Oct 2007 20:24:33 +0000 (20:24 +0000)
committerPeter Palfrader <peter@palfrader.org>
Sat, 27 Oct 2007 20:24:33 +0000 (20:24 +0000)
svn:r12232

contrib/auto-naming/Sample-Makefile [new file with mode: 0644]
contrib/auto-naming/Sample-crontab [new file with mode: 0644]

diff --git a/contrib/auto-naming/Sample-Makefile b/contrib/auto-naming/Sample-Makefile
new file mode 100644 (file)
index 0000000..e3e0351
--- /dev/null
@@ -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 (file)
index 0000000..b50c07b
--- /dev/null
@@ -0,0 +1,3 @@
+MAILTO=admin
+# cronjob for tor naming
+23 * * * * make -s -C auto-naming update && make -s -C auto-naming