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