aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2012-09-12 16:24:18 -0500
committerRobby Workman <rworkman@slackbuilds.org>2012-09-12 18:04:53 -0500
commitcb5f327002eb0d9f866c6d3c9f203ed8304f7b20 (patch)
tree7764a5b0d8c840dbb4f5f6d611168a95a8762c38
parentad4431d8e70dfe5afe046aa75153547492e2ac49 (diff)
network/tor: Fixed logrotate script (added "su" directive)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
-rw-r--r--network/tor/logrotate.tor1
-rw-r--r--network/tor/tor.SlackBuild7
-rw-r--r--network/tor/tor.info2
3 files changed, 6 insertions, 4 deletions
diff --git a/network/tor/logrotate.tor b/network/tor/logrotate.tor
index 7b1f8d6d8bd4..0b8f1289710a 100644
--- a/network/tor/logrotate.tor
+++ b/network/tor/logrotate.tor
@@ -1,4 +1,5 @@
/var/log/tor/*log {
+ su @USER@ @GROUP@
daily
rotate 5
compress
diff --git a/network/tor/tor.SlackBuild b/network/tor/tor.SlackBuild
index 18d759c52f3f..39813aab45c4 100644
--- a/network/tor/tor.SlackBuild
+++ b/network/tor/tor.SlackBuild
@@ -23,8 +23,8 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=tor
-VERSION=0.2.2.37
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-0.2.2.37}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
# Select tor's default user/group
@@ -110,9 +110,10 @@ chown $TOR_USER:$TOR_GROUP $PKG/var/{run,log,lib}/tor
chmod 0700 $PKG/var/lib/tor
install -D -m 0755 $CWD/rc.tor $PKG/etc/rc.d/rc.tor.new
install -D -m 0755 contrib/torctl $PKG/usr/bin/torctl
-install -D -m 0644 $CWD/logrotate.tor $PKG/etc/logrotate.d/tor.new
install -D -m 0644 $CWD/torrc $PKG/etc/tor/torrc.new
mv $PKG/etc/tor/tor-tsocks.conf $PKG/etc/tor/tor-tsocks.conf.new
+sed -e "s,@USER@,$TOR_USER," -e "s,@GROUP@,$TOR_GROUP," $CWD/logrotate.tor \
+ > $PKG/etc/logrotate.d/tor.new
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $(find $PKG/usr/man -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
diff --git a/network/tor/tor.info b/network/tor/tor.info
index 2a89611046a2..ef04cf4a1340 100644
--- a/network/tor/tor.info
+++ b/network/tor/tor.info
@@ -5,6 +5,6 @@ DOWNLOAD="https://archive.torproject.org/tor-package-archive/tor-0.2.2.37.tar.gz
MD5SUM="5aafdca4fb6af6e12b503d32b03f14a7"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="libevent"
+REQUIRES="%README% libevent"
MAINTAINER="Marco Bonetti"
EMAIL="sid77@slackware.it"