#!/bin/bash while : do running=$(ps -ef | grep "tickserver" | grep -v "grep") if [ "$running" ] then sleep 10 else echo "starting service ..." $PWD/tickserver -log tlog.txt & fi done