summaryrefslogtreecommitdiff
blob: 0eab278406b52088271a8284dbc79ac706b42ff3 (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
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2

depend() { 
	need net
}

checkconfig() {
        if [ ! -e "${GIMPS_DIR}" ]
        then
                einfo "Creating ${GIMPS_DIR}"
                mkdir "${GIMPS_DIR}"
        fi
}

start() {
        checkconfig
	ebegin "Starting GIMPS"
	nice -n 19 /opt/gimps/mprime -b${GIMPS_CPUS} -w${GIMPS_DIR} ${GIMPS_OPTIONS}
        eend $?
}

stop() {
        ebegin "Stopping GIMPS"
        killall mprime
        eend $?
}