summaryrefslogtreecommitdiff
blob: 975587cad36ae19b6a205110a640bce46a72c154 (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
30
31
#!/sbin/runscript

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

	if [ ! -e ${SETIATHOME_DIR}/user_info.sah ]
	then
		einfo "Setting up SETI@home for the first time"
		cd ${SETIATHOME_DIR}
		setiathome -login
	fi
}

start() {
	checkconfig

	ebegin "Starting SETI@home"
	cd ${SETIATHOME_DIR}
	./setiathome ${SETIATHOME_OPTIONS} >&/dev/null&
	eend $?
}

stop() {
	ebegin "Stopping SETI@home"
	killall setiathome
	eend $?
}