summarylogtreecommitdiffstats
path: root/icecreamd
blob: 22f32f77af174b2d8f31ee820b75ae8de599a0d7 (plain)
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
#!/bin/bash
. /etc/icecream.conf

if test -n "${ICECREAM_NETNAME}"; then
    netname="-n ${ICECREAM_NETNAME}"
fi
logfile=""
if test -n "${ICECREAM_LOG_FILE}"; then
    touch ${ICECREAM_LOG_FILE}
    chown icecream:icecream ${ICECREAM_LOG_FILE}
    logfile="-l ${ICECREAM_LOG_FILE}"
fi
nice=""
if test -n "${ICECREAM_NICE_LEVEL}"; then
    nice="--nice ${ICECREAM_NICE_LEVEL}"
fi
scheduler=""
if test -n "${ICECREAM_SCHEDULER_HOST}"; then
    scheduler="-s ${ICECREAM_SCHEDULER_HOST}"
fi
noremote=""
if test "${ICECREAM_ALLOW_REMOTE}" = "no" 2> /dev/null; then
    noremote="--no-remote"
fi
maxjobs=""
if test -n "${ICECREAM_MAX_JOBS}"; then
    if test "${ICECREAM_MAX_JOBS}" -eq 0 2> /dev/null; then
	    maxjobs="-m 1"
	    noremote="--no-remote"
    else
	    maxjobs="-m ${ICECREAM_MAX_JOBS}"
    fi
fi

/usr/lib/icecream/sbin/iceccd -u icecream ${logfile} ${nice} ${scheduler} ${netname} -b "${ICECREAM_BASEDIR}" ${maxjobs} ${noremote}  &>/dev/null