From c74f6bce72cad9e2599416d9602dd426d864f1d4 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 6 Feb 2011 19:55:23 +0100 Subject: [PATCH] icecc: Update of initscript. --- src/initscripts/init.d/icecream | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/initscripts/init.d/icecream b/src/initscripts/init.d/icecream index 6ce466003d..f8fa4e3330 100644 --- a/src/initscripts/init.d/icecream +++ b/src/initscripts/init.d/icecream @@ -15,24 +15,32 @@ . /etc/sysconfig/rc . ${rc_functions} -SCHEDULER=minerva.ipfire.org +#SCHEDULER=minerva.ipfire.org +ENABLE_SCHEDULER=on JOBS=8 -PORT=10244 case "${1}" in start) boot_mesg "Starting Icecream Daemon..." - /opt/icecream/sbin/iceccd -d -s ${SCHEDULER} -m ${JOBS} -p ${PORT} + ARGS="-d -m ${JOBS}" + if [ -n "${SCHEDULER}" ]; then + ARGS="${ARGS} -s ${SCHEDULER}" + fi + /opt/icecream/sbin/iceccd ${ARGS} evaluate_retval - if ! grep -q "${PORT}" /var/ipfire/xtaccess/config ; then - echo "tcp,0.0.0.0/0,${PORT},on,0.0.0.0,Icecream" >> /var/ipfire/xtaccess/config - /usr/local/bin/setxtaccess + + if [ "${ENABLE_SCHEDULER}" = "on" ]; then + /opt/icecream/sbin/icecc-scheduler -d fi ;; stop) boot_mesg "Stopping Icecream Daemon..." killproc /opt/icecream/sbin/iceccd + + if [ "${ENABLE_SCHEDULER}" = "on" ]; then + killproc /opt/icecream/sbin/icecc-scheduler + fi ;; restart) -- 2.39.5