Advertisement
Guest User

Untitled

a guest
Jul 14th, 2013
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.45 KB | None | 0 0
  1. #!/bin/bash
  2. #run-bitcoin.sh
  3. #make sure a process is always running.
  4.  
  5. #export DISPLAY=:0 #needed if you are running a simple gui app.
  6.  
  7. process=bitcoind
  8. makerun="/usr/bin/bitcoind"
  9.  
  10. ps cax | grep $process > /dev/null
  11. if [ $? -eq 0 ]; then
  12.     #echo "$process is running."
  13.     exit
  14. else
  15.     printf "$process is not running.\n"
  16.     $makerun
  17.     printf "\nHowever, I have started $process again for you.\n"
  18.     printf "~ Your faithful servant, Overseer"
  19.     exit
  20. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement