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