diff options
author | nico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-05-23 19:55:12 +0000 |
---|---|---|
committer | nico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-05-23 19:55:12 +0000 |
commit | 7ecd49171a4247121063928a5c1f85e5e025ddbe (patch) | |
tree | 337b9a65ab81b16b8dca316eb012b193f7796794 /package/tor/files/tor.init | |
parent | 87b7d5c2cd51e4836ef8918f5739f2602f87ffb0 (diff) |
Add tor package
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1026 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/tor/files/tor.init')
-rw-r--r-- | package/tor/files/tor.init | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/package/tor/files/tor.init b/package/tor/files/tor.init new file mode 100644 index 0000000000..8eb2db49f9 --- /dev/null +++ b/package/tor/files/tor.init @@ -0,0 +1,24 @@ +#!/bin/sh + +BIN=tor +DEFAULT=/etc/default/$BIN +LOG_D=/var/log/$BIN +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid +[ -f $DEFAULT ] && . $DEFAULT + +case $1 in + start) + mkdir -p $LOG_D + mkdir -p $RUN_D + $BIN $OPTIONS + ;; + stop) + [ -f $PID_F ] && kill $(cat $PID_F) + ;; + *) + echo "usage: $0 (start|stop)" + exit 1 +esac + +exit $? |