#!/sbin/runscript # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/app-sci/foldingathome/files/folding-init.d-r2,v 1.1 2004/04/22 10:01:17 phosphan Exp $ start() { ebegin "Starting Folding@Home" for (($CPU; CPU != 0; CPU--)) do cd /opt/foldingathome/client${CPU}/ rm -f /opt/foldingathome/log-${CPU} nice -n 20 su foldingathome -c "/opt/foldingathome/client${CPU}/foldingathome ${FOLD_OPTS}" 2>&1 >/opt/foldingathome/log-${CPU} & done eend $? } stop() { ebegin "Stopping Folding@Home" for I in FahCore*.exe do killall -q $I >/dev/null done killall foldingathome >/dev/null eend $? }