forked from worldwide-asset-exchange/wax-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreset.sh
More file actions
executable file
·22 lines (17 loc) · 787 Bytes
/
reset.sh
File metadata and controls
executable file
·22 lines (17 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash
read -p "This will reset your WAX node data so you can start again from scratch. This operation requires sudo. Are you sure? " -n 1 -r
echo # (optional) move to a new line
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
echo "Exiting without reset"
[[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1 # handle exits from shell or function but don't exit interactive shell
fi
HOST_WAX_HOME=${HOST_WAX_HOME:-`pwd`}
./stop.sh
sudo rm -rf $HOST_WAX_HOME/nodeos/data
sudo rm -rf $HOST_WAX_HOME/nodeos/config/protocol_features
sudo rm -rf $HOST_WAX_HOME/shipnodeos/data
sudo rm -rf $HOST_WAX_HOME/shipnodeos/config/protocol_features
sudo rm -rf $HOST_WAX_HOME/snapshotnodeos/data
sudo rm -rf $HOST_WAX_HOME/snapshotnodeos/config/protocol_features
echo "WAX node reset success"