| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
DAEMON=/usr/sbin/iceccd |
| 4 |
CONFIGFILE=/etc/icecc/icecc.conf |
| 5 |
|
| 6 |
[ -e $CONFIGFILE ] && . $CONFIGFILE |
| 7 |
|
| 8 |
params="" |
| 9 |
|
| 10 |
if [ -n "$ICECC_NICE_LEVEL" ] ; then |
| 11 |
params="$params --nice $ICECC_NICE_LEVEL" |
| 12 |
fi |
| 13 |
|
| 14 |
if [ -n "$ICECC_LOG_FILE" ] ; then |
| 15 |
params="$params --log-file $ICECC_LOG_FILE" |
| 16 |
fi |
| 17 |
|
| 18 |
if [ -n "$ICECC_NETNAME" ] ; then |
| 19 |
params="$params --netname $ICECC_NETNAME" |
| 20 |
fi |
| 21 |
|
| 22 |
if [ -n "$ICECC_MAX_JOBS" ] ; then |
| 23 |
if [ "$ICECC_MAX_JOBS" -eq 0 ] ; then |
| 24 |
params="$params --max-processes 1" |
| 25 |
params="$params --no-remote" |
| 26 |
else |
| 27 |
params="$params --max-processes $ICECC_MAX_JOBS" |
| 28 |
fi |
| 29 |
fi |
| 30 |
|
| 31 |
if [ "$ICECC_ALLOW_REMOTE" != "yes" ] ; then |
| 32 |
params="$params --no-remote" |
| 33 |
fi |
| 34 |
|
| 35 |
if [ -n "$ICECC_BASEDIR" ] ; then |
| 36 |
params="$params --env-basedir $ICECC_BASEDIR" |
| 37 |
fi |
| 38 |
|
| 39 |
if [ -n "$ICECC_SCHEDULER_HOST" ] ; then |
| 40 |
params="$params --scheduler-host $ICECC_SCHEDULER_HOST" |
| 41 |
fi |
| 42 |
|
| 43 |
if [ -n "$ICECC_CACHE_LIMIT" ] ; then |
| 44 |
params="$params --cache-limit $ICECC_CACHE_LIMIT" |
| 45 |
fi |
| 46 |
|
| 47 |
|
| 48 |
exec $DAEMON "$@" $params |