aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-03-18 21:45:36 +0000
committerNick Mathewson <nickm@torproject.org>2005-03-18 21:45:36 +0000
commit59653fea457a85e70858c848d73d64657e0b6de5 (patch)
tree16ae2ebcdba897be78e158919fe2be6e7d16c02d /contrib
parent4b400312de504885f722e5f726ce10527c43da1d (diff)
downloadtor-59653fea457a85e70858c848d73d64657e0b6de5.tar
tor-59653fea457a85e70858c848d73d64657e0b6de5.tar.gz
Make OS X log happily to /var/log/Tor
svn:r3775
Diffstat (limited to 'contrib')
-rw-r--r--contrib/osx/TorPostflight13
1 files changed, 13 insertions, 0 deletions
diff --git a/contrib/osx/TorPostflight b/contrib/osx/TorPostflight
index 8919f376c..e3689589a 100644
--- a/contrib/osx/TorPostflight
+++ b/contrib/osx/TorPostflight
@@ -12,6 +12,7 @@ TORUSER=_tor
TORGROUP=daemon
TARGET=$2/Library/Tor
TORDIR=$TARGET/var/lib/tor
+LOGDIR=$TARGET/var/log/tor
# Create user $TORUSER in group daemon. If it's already there, great.
$ADDSYSUSER $TORUSER "Tor System user" $TORDIR
@@ -20,10 +21,16 @@ $ADDSYSUSER $TORUSER "Tor System user" $TORDIR
if [ ! -d $TORDIR ]; then
mkdir -p $TORDIR
fi
+if [ ! -d $LOGDIR ]; then
+ mkdir -p $LOGDIR
+fi
# Check its permissions.
chown $TORUSER $TORDIR
chgrp daemon $TORDIR
chmod 700 $TORDIR
+chown $TORUSER $LOGDIR
+chgrp daemon $LOGDIR
+chmod 700 $LOGDIR
# Create the configuration file only if there wan't one already.
if [ ! -f $TARGET/torrc ]; then
@@ -44,3 +51,9 @@ ln -sf $TARGET/tor_resolve .
cd /usr/share/man/man1
MAN1=$TARGET/man/man1
ln -sf $MAN1/*.1 .
+
+if [ ! -e /var/log/tor -o -L /var/log/tor ]; then
+ cd /var/log
+ rm -f tor
+ ln -sf $LOGDIR tor
+fi \ No newline at end of file