diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-03-18 21:45:36 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-03-18 21:45:36 +0000 |
commit | 59653fea457a85e70858c848d73d64657e0b6de5 (patch) | |
tree | 16ae2ebcdba897be78e158919fe2be6e7d16c02d /contrib | |
parent | 4b400312de504885f722e5f726ce10527c43da1d (diff) | |
download | tor-59653fea457a85e70858c848d73d64657e0b6de5.tar.gz tor-59653fea457a85e70858c848d73d64657e0b6de5.zip |
Make OS X log happily to /var/log/Tor
svn:r3775
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/osx/TorPostflight | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/contrib/osx/TorPostflight b/contrib/osx/TorPostflight index 8919f376c9..e3689589a2 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 |