1 |
je_fro 08/11/22 04:37:22 |
2 |
|
3 |
Modified: fah-init |
4 |
Log: |
5 |
Changing to use init script from Constantin Baranov on bug #218331 |
6 |
(Portage version: 2.2_rc14/cvs/Linux 2.6.27-gentoo-r3 x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.2 sci-biology/foldingathome/files/6.02/fah-init |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-biology/foldingathome/files/6.02/fah-init?rev=1.2&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-biology/foldingathome/files/6.02/fah-init?rev=1.2&content-type=text/plain |
13 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-biology/foldingathome/files/6.02/fah-init?r1=1.1&r2=1.2 |
14 |
|
15 |
Index: fah-init |
16 |
=================================================================== |
17 |
RCS file: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/files/6.02/fah-init,v |
18 |
retrieving revision 1.1 |
19 |
retrieving revision 1.2 |
20 |
diff -u -r1.1 -r1.2 |
21 |
--- fah-init 3 Aug 2008 03:19:59 -0000 1.1 |
22 |
+++ fah-init 22 Nov 2008 04:37:22 -0000 1.2 |
23 |
@@ -1,7 +1,7 @@ |
24 |
#!/sbin/runscript |
25 |
# Copyright 1999-2007 Gentoo Foundation |
26 |
# Distributed under the terms of the GNU General Public License v2 |
27 |
-# $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 $ |
28 |
+# $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 $ |
29 |
|
30 |
opts="${opts} unitinfo" |
31 |
|
32 |
@@ -13,24 +13,15 @@ |
33 |
start() { |
34 |
ebegin "Starting Folding@Home" |
35 |
cd /opt/foldingathome/amd64-smp |
36 |
- start-stop-daemon -v --chdir ${PWD} --chuid foldingathome --nicelevel 19 --start --background --exec ./fah6 -- ${FOLD_OPTS} |
37 |
+ start-stop-daemon --chdir ${PWD} --chuid foldingathome --nicelevel 19 \ |
38 |
+ --make-pidfile --pidfile "${PIDFILE}" \ |
39 |
+ --start --background --exec ./fah6 -- ${FOLD_OPTS} |
40 |
eend $? |
41 |
} |
42 |
|
43 |
stop() { |
44 |
ebegin "Stopping Folding@Home" |
45 |
- start-stop-daemon -vv --stop --user foldingathome --exec /opt/foldingathome/amd64-smp/fah6 |
46 |
- cd /opt/foldingathome/amd64-smp |
47 |
- for I in FahCore*.exe; do |
48 |
- if ps ax|grep $I > /dev/null 2>&1; then |
49 |
- killall -q $I > /dev/null 2>&1 |
50 |
- fi |
51 |
- done |
52 |
- sleep 1 |
53 |
- if ps ax|grep '[/]opt[/]foldingathome[/]amd64-smp[/]fah6' > /dev/null 2>&1; then |
54 |
- eend 1 |
55 |
- else |
56 |
- eend 0 |
57 |
- fi |
58 |
+ start-stop-daemon --stop --user foldingathome --pidfile "${PIDFILE}" |
59 |
+ eend $? |
60 |
+ killall --user foldingathome --signal SIGKILL |
61 |
} |
62 |
- |