#!/sbin/runscript # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $ opts="${opts} unitinfo" depend() { after bootmisc need localmount need net } unitinfo() { einfo "$(head -n1 /opt/foldingathome/unitinfo.txt):" sed -e '1,2d' /opt/foldingathome/unitinfo.txt } start() { ebegin "Starting Folding@Home" cd /opt/foldingathome start-stop-daemon --chdir ${PWD} --chuid foldingathome --nicelevel 19 \ --make-pidfile --pidfile "${PIDFILE}" \ --start --background --exec ./fah6_alt -- ${FOLD_OPTS} eend $? } stop() { ebegin "Stopping Folding@Home" start-stop-daemon --stop --user foldingathome --pidfile "${PIDFILE}" eend $? }