ts.sh 307 B

1234567891011
  1. #!/bin/bash
  2. while true; do
  3. running=$(ps -ef | grep "tickserver" | grep -v "grep")
  4. if [ "$running" ]; then
  5. sleep 10
  6. else
  7. mv -f $PWD/tickserver.out $PWD/../tserver.out
  8. echo "starting service ..."
  9. nohup $PWD/tickserver > $PWD/tickserver.out 2>&1 &
  10. fi
  11. done