more guard.sh
#!/bin/sh
while true; do
ps ax > /tmp/ps.log
if grep 'h2es' /tmp/ps.log ; then
echo "Found h2es process!"
else
echo "Not found h2es process! Restart h2es"
cd /usr/local/hand2eye/server && /usr/local/hand2eye/server/h2es
fi
sleep 10
done