ds.sh 364 B

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