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
}
## 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