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