tor: fix tor init script (#2279)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@8532 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
2e90ed1c08
commit
e12cdb0b84
@ -5,13 +5,17 @@ START=50
|
||||
BIN=tor
|
||||
DEFAULT=/etc/default/$BIN
|
||||
LOG_D=/var/log/$BIN
|
||||
LIB_D=/var/lib/$BIN
|
||||
RUN_D=/var/run
|
||||
PID_F=$RUN_D/$BIN.pid
|
||||
RUN_USER=$BIN
|
||||
RUN_GROUP=$BIN
|
||||
|
||||
start() {
|
||||
[ -f $DEFAULT ] && . $DEFAULT
|
||||
mkdir -p $LOG_D
|
||||
mkdir -p $RUN_D
|
||||
[ -d $LIB_D ] || mkdir -p $LOG_D
|
||||
[ -d $LIB_D ] || ( mkdir -p $LIB_D && chown $RUN_USER:$RUN_GROUP $LIB_D )
|
||||
[ -d $RUN_D ] || mkdir -p $RUN_D
|
||||
$BIN $OPTIONS
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ RunAsDaemon 1
|
||||
|
||||
## The directory for keeping all the keys/etc. By default, we store
|
||||
## things in $HOME/.tor on Unix, and in Application Data\tor on Windows.
|
||||
#DataDirectory /var/lib/tor
|
||||
DataDirectory /var/lib/tor
|
||||
|
||||
## The port on which Tor will listen for local connections from Tor controller
|
||||
## applications, as documented in control-spec.txt. NB: this feature is
|
||||
|
Loading…
x
Reference in New Issue
Block a user