Guest User

Untitled

a guest
Mar 19th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. #
  4. FOLDER=".XIOS1"
  5.  
  6. cd $FOLDER
  7. git pull
  8. cd
  9.  
  10. # Get the block count from the wallet
  11. block=`/root/xios/src/XIOSd -datadir=/root/$FOLDER -config=/root/$FOLDER/XIOS.conf getblockcount`
  12.  
  13. echo "folder is $FOLDER"
  14. echo "block is $block"
  15. echo "test done"
  16.  
  17. # Stop wallet
  18. /root/xios/src/XIOSd -datadir=/root/$FOLDER -config=/root/$FOLDER/XIOS.conf stop
  19.  
  20. # Remove old copy
  21. rm -r $HOME/xios_snap/database
  22. rm -r $HOME/xios_snap/txleveldb
  23. rm $HOME/xios_snap/banlist.dat
  24. rm $HOME/xios_snap/peers.dat
  25. rm $HOME/xios_snap/blk0001.dat
  26.  
  27. # Nuke old github
  28. cd $HOME/xios_snap/
  29. git commit -a -m "nuke"
  30. git push
  31.  
  32. # Make a new copy my XIOSd files to upload dir
  33. cp -r $HOME/$FOLDER/database $HOME/xios_snap/.
  34. cp -r $HOME/$FOLDER/txleveldb $HOME/xios_snap/.
  35. cp $HOME/$FOLDER/banlist.dat $HOME/xios_snap/.
  36. cp $HOME/$FOLDER/peers.dat $HOME/xios_snap/.
  37. cp $HOME/$FOLDER/blk0001.dat $HOME/xios_snap/.
  38.  
  39.  
  40. # Upload that files
  41. cd $HOME/xios_snap/
  42. git add database
  43. git add txleveldb
  44. git add banlist.dat
  45. git add peers.dat
  46. git lfs track 'blk0001.dat'
  47. git add .gitattributes "blk0001.dat"
  48.  
  49. # Commit changes
  50. git commit -a -m "$block"
  51. git push
  52.  
  53. # restart XIOSd
  54. /root/xios/src/XIOSd -datadir=/root/$FOLDER -config=/root/$FOLDER/XIOS.conf -daemon
Add Comment
Please, Sign In to add comment