diff options
Diffstat (limited to 'sci-biology/foldingathome/files/6.29/fah-init')
-rw-r--r-- | sci-biology/foldingathome/files/6.29/fah-init | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sci-biology/foldingathome/files/6.29/fah-init b/sci-biology/foldingathome/files/6.29/fah-init new file mode 100644 index 000000000000..23543db3d35c --- /dev/null +++ b/sci-biology/foldingathome/files/6.29/fah-init @@ -0,0 +1,27 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/files/6.29/fah-init,v 1.1 2010/06/17 09:21:59 jlec Exp $ + +opts="${opts} unitinfo" + +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 -- ${FOLD_OPTS} + eend $? +} + +stop() { + ebegin "Stopping Folding@Home" + start-stop-daemon --stop --user foldingathome --pidfile "${PIDFILE}" + eend $? + [[ -f ${PIDFILE} ]] && killall --user foldingathome --signal SIGKILL +} |