forked from UptickNetwork/uptick-testnet
-
Notifications
You must be signed in to change notification settings - Fork 1
/
node.sh
35 lines (31 loc) · 1.22 KB
/
node.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
#download package
cd $HOME
wget http://download.uptick.network/download/uptick/testnet/release/v0.2.3/v0.2.3.tar.gz
tar -zxvf v0.2.3.tar.gz
chmod +x uptick-v0.2.3/linux/uptickd
#add environment variable
mkdir -p $HOME/go/bin
echo "export GOPATH=$HOME/go" >> ~/.bashrc
source ~/.bashrc
echo "export GOBIN=$GOPATH/bin" >> ~/.bashrc
source ~/.bashrc
echo "export PATH=$PATH:$GOBIN" >> ~/.bashrc
source ~/.bashrc
cp uptick-v0.2.3/linux/uptickd $HOME/go/bin/
# init uptickd
uptickd init testnet --chain-id=uptick_7000-1
#download data file
cd $HOME/.uptickd
rm -rf data
wget http://download.uptick.network/download/uptick/testnet/node/data/data.tar.gz
tar -zxvf data.tar.gz
#update Configuration
curl -o $HOME/.uptickd/config/config.toml https://raw.githubusercontent.com/UptickNetwork/uptick-testnet/main/uptick_7000-1/config.toml
curl -o $HOME/.uptickd/config/genesis.json https://raw.githubusercontent.com/UptickNetwork/uptick-testnet/main/uptick_7000-1/genesis.json
curl -o $HOME/.uptickd/config/app.toml https://raw.githubusercontent.com/UptickNetwork/uptick-testnet/main/uptick_7000-1/app.toml
#add startup Script
cd $HOME
echo 'nohup uptickd start > $HOME/node.log 2>&1 & ' > start.sh && chmod +x start.sh
# start
./start.sh