4
# Required-Start: $local_fs $remote_fs
5
# Required-Stop: $local_fs $remote_fs
6
# Default-Start: 2 3 4 5
8
# Short-Description: control icecc daemon start at boot time
9
# Description: control icecc daemon start at boot time by
10
# sourcing /etc/default/icecc and /etc/icecc/icecc.conf.
13
DAEMON=/usr/sbin/iceccd
14
CONFIGFILE=/etc/icecc/icecc.conf
15
DEFAULTFILE=/etc/default/icecc
17
# Read configuration files
18
[ -r $CONFIGFILE ] && . $CONFIGFILE
19
[ -r $DEFAULTFILE ] && . $DEFAULTFILE
21
test -x $DAEMON || exit 0
23
. /lib/lsb/init-functions
26
if test -n "$ICECC_NETNAME"; then
27
netname="-n $ICECC_NETNAME"
30
start_icecc_daemon() {
32
if test -n "$ICECC_LOG_FILE"; then
33
logfile="-l $ICECC_LOG_FILE"
36
if test -n "$ICECC_NICE_LEVEL"; then
37
nice="--nice $ICECC_NICE_LEVEL"
40
if test -n "$ICECC_SCHEDULER_HOST"; then
41
scheduler="-s $ICECC_SCHEDULER_HOST"
44
if test -n "$ICECC_BASEDIR"; then
45
basedir="-b $ICECC_BASEDIR"
48
if test "$ICECC_ALLOW_REMOTE" = "no"; then
49
noremote="--no-remote"
52
if test -n "$ICECC_MAX_JOBS"; then
53
if test "$ICECC_MAX_JOBS" -eq 0; then
55
noremote="--no-remote"
57
maxjobs="-m $ICECC_MAX_JOBS"
61
start-stop-daemon --start --quiet --exec $DAEMON -- \
62
-d $logfile $nice $scheduler $netname -u icecc $basedir $maxjobs $noremote
66
start-stop-daemon --stop --quiet --signal TERM --oknodo --exec $DAEMON
71
log_daemon_msg "Starting distributed compiler daemon" "iceccd"
76
log_daemon_msg "Stopping distributed compiler daemon" "iceccd"
81
log_daemon_msg "Restarting distributed compiler daemon" "iceccd"
88
status_of_proc "$DAEMON" "iceccd" && exit 0 || exit $?
92
echo "Usage: $N {start|stop|restart|force-reload|status}" >&2