st.sh 239 B

123456789101112
  1. #!/bin/bash
  2. while :
  3. do
  4. running=$(ps -ef | grep "tickserver" | grep -v "grep")
  5. if [ "$running" ]
  6. then
  7. sleep 10
  8. else
  9. echo "starting service ..."
  10. $PWD/tickserver -log tlog.txt &
  11. fi
  12. done