Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #
- #
- FOLDER=".XIOS1"
- cd $FOLDER
- git pull
- cd
- # Get the block count from the wallet
- block=`/root/xios/src/XIOSd -datadir=/root/$FOLDER -config=/root/$FOLDER/XIOS.conf getblockcount`
- echo "folder is $FOLDER"
- echo "block is $block"
- echo "test done"
- # Stop wallet
- /root/xios/src/XIOSd -datadir=/root/$FOLDER -config=/root/$FOLDER/XIOS.conf stop
- # Remove old copy
- rm -r $HOME/xios_snap/database
- rm -r $HOME/xios_snap/txleveldb
- rm $HOME/xios_snap/banlist.dat
- rm $HOME/xios_snap/peers.dat
- rm $HOME/xios_snap/blk0001.dat
- # Nuke old github
- cd $HOME/xios_snap/
- git commit -a -m "nuke"
- git push
- # Make a new copy my XIOSd files to upload dir
- cp -r $HOME/$FOLDER/database $HOME/xios_snap/.
- cp -r $HOME/$FOLDER/txleveldb $HOME/xios_snap/.
- cp $HOME/$FOLDER/banlist.dat $HOME/xios_snap/.
- cp $HOME/$FOLDER/peers.dat $HOME/xios_snap/.
- cp $HOME/$FOLDER/blk0001.dat $HOME/xios_snap/.
- # Upload that files
- cd $HOME/xios_snap/
- git add database
- git add txleveldb
- git add banlist.dat
- git add peers.dat
- git lfs track 'blk0001.dat'
- git add .gitattributes "blk0001.dat"
- # Commit changes
- git commit -a -m "$block"
- git push
- # restart XIOSd
- /root/xios/src/XIOSd -datadir=/root/$FOLDER -config=/root/$FOLDER/XIOS.conf -daemon
Add Comment
Please, Sign In to add comment