From: Oliver Ertl Date: Tue, 28 Aug 2007 17:09:49 +0000 (+0000) Subject: tor: fix tor init script (#2279) X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0818c3f26aa83ae983600f00e103702ff722d30d;p=openwrt%2Fsvn-archive%2Fpackages.git tor: fix tor init script (#2279) SVN-Revision: 8532 --- diff --git a/net/tor/files/tor.init b/net/tor/files/tor.init index a6b823585..6944e8868 100644 --- a/net/tor/files/tor.init +++ b/net/tor/files/tor.init @@ -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 } diff --git a/net/tor/files/torrc b/net/tor/files/torrc index e5cf75b6e..edb7191f5 100644 --- a/net/tor/files/torrc +++ b/net/tor/files/torrc @@ -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