aboutsummaryrefslogtreecommitdiff
path: root/net/misc/tor/rc.tor.new
diff options
context:
space:
mode:
authorrhatto <rhatto@18ef50b8-d735-4ccd-97c1-689132df3dd9>2008-09-03 03:48:23 +0000
committerrhatto <rhatto@18ef50b8-d735-4ccd-97c1-689132df3dd9>2008-09-03 03:48:23 +0000
commitf067192c38e4af6208b1f35a76f0c952266869f8 (patch)
treed9c6bd428c3bb07de33ec0679d9b25d26d7fd202 /net/misc/tor/rc.tor.new
parent36765ff8fda0ca2f697346e2df6992cd418a1638 (diff)
downloadmkbuilds-f067192c38e4af6208b1f35a76f0c952266869f8.tar.gz
mkbuilds-f067192c38e4af6208b1f35a76f0c952266869f8.tar.bz2
merging with changes made since 21th May
git-svn-id: svn+slack://slack.fluxo.info/var/svn/mkbuilds@233 18ef50b8-d735-4ccd-97c1-689132df3dd9
Diffstat (limited to 'net/misc/tor/rc.tor.new')
-rwxr-xr-xnet/misc/tor/rc.tor.new20
1 files changed, 20 insertions, 0 deletions
diff --git a/net/misc/tor/rc.tor.new b/net/misc/tor/rc.tor.new
new file mode 100755
index 0000000..f90b6d3
--- /dev/null
+++ b/net/misc/tor/rc.tor.new
@@ -0,0 +1,20 @@
+#!/bin/sh
+#
+# init script for tor
+#
+
+PID="/var/run"
+PRIVOXY_PID="$PID/privoxy.pid"
+TOR_PID="$PID/tor.pid"
+USER="privoxy"
+
+if [ -f $TOR_PID ]; then
+ if ps `cat $TOR_PID` | grep -q tor; then
+ kill `cat $TOR_PID`
+ fi
+ rm $TOR_PID
+fi
+
+sudo -u $USER /usr/bin/tor &> /dev/null &
+echo "$!" > $TOR_PID
+