1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
#!/usr/bin/env sh
DMUCS_DIR=/us/bfsbld/Compilers/distcc
#
# This shell script simply starts up the distccd daemons and the
# loadavg daemon on this host. The only argument to it is the location of
# the dmucs server ('dmucs').
#
if [ $# -eq 0 ] ; then
echo "Usage: $0 <server-machine>"
exit
fi
server=$1
echo "Starting distcc daemons"
logfile=$DMUCS_DIR/log/`hostname`.log
pidfile=$DMUCS_DIR/pids/`hostname`.pid
#
# NOTE NOTE NOTE: you probably want to change the value of the "--allow"
# argument to something more restrictive. See the distcc documentation for
# more information.
#
$DMUCS_DIR/bin/distccd --daemon --log-file=$logfile --pid-file $DMUCS_DIR/pids/`hostname`.pid --allow 0.0.0.0/0
echo "done: daemons writing to log file" $logfile
echo " master daemon pid" `cat $pidfile`
echo "Starting loadavg daemon, communicating with $server"
$DMUCS_DIR/bin/loadavg -s $server &
echo "done"
|