summaryrefslogtreecommitdiff
blob: 86d2cc1cec30600138d99d4f38fbbc8fdfdd6c1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/sbin/runscript
# Copyright 1999-2003 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/files/folding-init.d-r1,v 1.1 2004/12/23 18:37:10 ribosome Exp $

start() {
	ebegin "Starting Folding@home"
	if [ ! -f /opt/foldingathome/client.cfg ]; then
		eerror "Can't start without initial configuration."
		eerror "For first run configuration, please run"
		eerror "/opt/foldingathome/initfolding"
		return 1
	fi
	cd /opt/foldingathome
	su foldingathome ./folding.sh
	eend $?
}

stop() {
	ebegin "Stopping Folding@Home"
	cd /opt/foldingathome
	for I in FahCore*.exe
	do
		killall -q $I >/dev/null
	done
	killall foldingathome >/dev/null
	eend $?
}