summaryrefslogtreecommitdiffstats
path: root/abs/core/runit-scripts/runitscripts/services/fah/finish
blob: 9385e7c4d1fc388df07897d2d1e4a981e2fc1b9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
export TERM=linux
. /etc/rc.conf
. /etc/rc.d/functions


[ -e /etc/sv/fah/.runtime ] || mkdir -p /etc/sv/fah/.runtime
touch /etc/sv/fah/.runtime/`date +%s`
numfiles=`/usr/bin/file_time_offset.py   -s4 -d/etc/sv/fah/.runtime `
if [ $numfiles -gt 3 ]
then
	 rm -f /etc/sv/fah/.runtime/* 2>/dev/null
	 sv stop fah
	 printhl "    folding@home is not able to start, disabling it"
fi