Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- P2POOL_DIR=~/p2pool
- EXISTINGPID=`pgrep -f run_p2pool.py -U bitcoin`
- cd $P2POOL_DIR
- if git pull | grep -q 'Already up-to-date'; then
- if [[ ! -z "$EXISTINGPID" ]]; then
- echo "No restart needed for p2pool"
- else
- echo "No update for p2pool but found no running instance, launching..."
- ../pool.sh
- fi
- else
- echo "Starting new p2pool"
- ../pool.sh
- if [[ ! -z "$EXISTINGPID" ]]; then
- echo "Waiting for new p2pool to be ready"
- sleep 90
- echo "Killing old p2pool"
- kill $EXISTINGPID
- fi
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement