#!/bin/sh -e
#
# start the log multiplexers
#
# $Cambridge: hermes/src/stats/scripts/logrun,v 1.6 2005/06/08 08:07:56 fanf2 Exp $

PATH=$PATH:/opt/stats/bin:/opt/stats/scripts

FIFO=/var/log/ppsw_fifo
DIR=/data/stats/ppsw
SOCK=$DIR/log_sock

cd /data/stats/ppsw

# master multiplexer
logmux -p $DIR/logmux.pid -f $FIFO -s $SOCK -c -d
# give us access to the socket
chmod g+w $SOCK

# log surfing
loguse -cp $DIR/loguse.surf.pid -s $SOCK | logsurf | logmux -s canvas.csi.cam.ac.uk:2000 &

# blacklist creation (not yet)
#loguse -cp $DIR/loguse.bl.pid -s $SOCK | log2bl -r &

exit
