[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Make OS X log happily to /var/log/Tor
Update of /home/or/cvsroot/tor/contrib/osx
In directory moria.mit.edu:/tmp/cvs-serv28228/contrib/osx
Modified Files:
TorPostflight
Log Message:
Make OS X log happily to /var/log/Tor
Index: TorPostflight
===================================================================
RCS file: /home/or/cvsroot/tor/contrib/osx/TorPostflight,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- TorPostflight 18 Mar 2005 20:59:14 -0000 1.3
+++ TorPostflight 18 Mar 2005 21:45:36 -0000 1.4
@@ -12,6 +12,7 @@
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 @@
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 @@
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