#!/bin/sh
process="tachyon"
script="tachyon"
url="http://ucm.dev/"
timeout=5
sleep=300
while true; do
	if q pidof $process && wget -T$timeout --save-headers -q "$url" -O- | head -n1 | q grep '200 OK'; then
		:
	else
		echo `dth`: $process down
		sudo /i/$script restart
	fi
	sleep $sleep
done
