From: olli Date: Tue, 28 Aug 2007 17:09:49 +0000 (+0000) Subject: tor: fix tor init script (#2279) X-Git-Url: http://git.archive.openwrt.org/?a=commitdiff_plain;h=e12cdb0b84c892b062cfca4c81bde6256ac97402;p=packages.git tor: fix tor init script (#2279) git-svn-id: svn://svn.openwrt.org/openwrt/packages@8532 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- 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