]>
Commit | Line | Data |
---|---|---|
1 | #!/bin/sh | |
2 | ######################################################################## | |
3 | # Begin $rc_base/init.d/icecream | |
4 | # | |
5 | # Description : This is a script that starts the icecream daemon. | |
6 | # | |
7 | # Authors : Michael Tremer (mitch@ipfire.org) | |
8 | # | |
9 | # Version : 01.00 | |
10 | # | |
11 | # Notes : | |
12 | # | |
13 | ######################################################################## | |
14 | ||
15 | . /etc/sysconfig/rc | |
16 | . ${rc_functions} | |
17 | ||
18 | #SCHEDULER=minerva.ipfire.org | |
19 | ENABLE_SCHEDULER=on | |
20 | JOBS=8 | |
21 | ||
22 | case "${1}" in | |
23 | start) | |
24 | boot_mesg "Starting Icecream Daemon..." | |
25 | ARGS="-d -m ${JOBS}" | |
26 | if [ -n "${SCHEDULER}" ]; then | |
27 | ARGS="${ARGS} -s ${SCHEDULER}" | |
28 | fi | |
29 | /opt/icecream/sbin/iceccd ${ARGS} | |
30 | evaluate_retval | |
31 | ||
32 | if [ "${ENABLE_SCHEDULER}" = "on" ]; then | |
33 | /opt/icecream/sbin/icecc-scheduler -d | |
34 | fi | |
35 | ;; | |
36 | ||
37 | stop) | |
38 | boot_mesg "Stopping Icecream Daemon..." | |
39 | killproc /opt/icecream/sbin/iceccd | |
40 | ||
41 | if [ "${ENABLE_SCHEDULER}" = "on" ]; then | |
42 | killproc /opt/icecream/sbin/icecc-scheduler | |
43 | fi | |
44 | ;; | |
45 | ||
46 | restart) | |
47 | ${0} stop | |
48 | sleep 1 | |
49 | ${0} start | |
50 | ;; | |
51 | ||
52 | status) | |
53 | statusproc /opt/icecream/sbin/iceccd | |
54 | ;; | |
55 | ||
56 | *) | |
57 | echo "Usage: ${0} {start|stop|reload|restart|status}" | |
58 | exit 1 | |
59 | ;; | |
60 | esac | |
61 | ||
62 | # End $rc_base/init.d/icecream |