#!/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

