summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Gardner <je_fro@gentoo.org>2008-11-22 04:37:22 +0000
committerJeffrey Gardner <je_fro@gentoo.org>2008-11-22 04:37:22 +0000
commitb28bf964c83e404a437c99367f0e7e5c4a4e8455 (patch)
treec18ca319bf3988fa607b875eda66a0b1abac6f7d /sci-biology/foldingathome/files
parentEbuild cleanup. (diff)
downloadgentoo-2-b28bf964c83e404a437c99367f0e7e5c4a4e8455.tar.gz
gentoo-2-b28bf964c83e404a437c99367f0e7e5c4a4e8455.tar.bz2
gentoo-2-b28bf964c83e404a437c99367f0e7e5c4a4e8455.zip
Changing to use init script from Constantin Baranov on bug #218331
(Portage version: 2.2_rc14/cvs/Linux 2.6.27-gentoo-r3 x86_64)
Diffstat (limited to 'sci-biology/foldingathome/files')
-rw-r--r--sci-biology/foldingathome/files/6.02/fah-init23
1 files changed, 7 insertions, 16 deletions
diff --git a/sci-biology/foldingathome/files/6.02/fah-init b/sci-biology/foldingathome/files/6.02/fah-init
index c728c592a937..1447b0910d63 100644
--- a/sci-biology/foldingathome/files/6.02/fah-init
+++ b/sci-biology/foldingathome/files/6.02/fah-init
@@ -1,7 +1,7 @@
#!/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.02/fah-init,v 1.1 2008/08/03 03:19:59 je_fro Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/files/6.02/fah-init,v 1.2 2008/11/22 04:37:22 je_fro Exp $
opts="${opts} unitinfo"
@@ -13,24 +13,15 @@ unitinfo() {
start() {
ebegin "Starting Folding@Home"
cd /opt/foldingathome/amd64-smp
- start-stop-daemon -v --chdir ${PWD} --chuid foldingathome --nicelevel 19 --start --background --exec ./fah6 -- ${FOLD_OPTS}
+ 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 -vv --stop --user foldingathome --exec /opt/foldingathome/amd64-smp/fah6
- cd /opt/foldingathome/amd64-smp
- for I in FahCore*.exe; do
- if ps ax|grep $I > /dev/null 2>&1; then
- killall -q $I > /dev/null 2>&1
- fi
- done
- sleep 1
- if ps ax|grep '[/]opt[/]foldingathome[/]amd64-smp[/]fah6' > /dev/null 2>&1; then
- eend 1
- else
- eend 0
- fi
+ start-stop-daemon --stop --user foldingathome --pidfile "${PIDFILE}"
+ eend $?
+ killall --user foldingathome --signal SIGKILL
}
-