-
Notifications
You must be signed in to change notification settings - Fork 0
/
autoinstall
76 lines (55 loc) · 2.05 KB
/
autoinstall
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash
clear
if [[ ! -f "$HOME/.bash_profile" ]]; then
touch "$HOME/.bash_profile"
fi
if [ -f "$HOME/.bash_profile" ]; then
source $HOME/.bash_profile
fi
logo_nodesync(){
clear
cat << "EOF"
=========================================================================
_ _ _ ____
| \ | | | | / ___|
| \| | ___ __| | ___| (__ _ _ ___ __ _____ ___ ___
| |/ _ \ / _ |/ __\\__ \| | | | _ \ / _| |_ _|/ _ \| _ \
| |\ | (_) | (_) | /o_ ___) | |_| | | | | (_ _ | | | (_) | |_) |
|_| \_|\___/ \____|\___|____/ \__ |_| |_|\__(_) |_| \___/| _ /
_/ | | |
|__/ |_|
=========================================================================
Developed by: NodeSync.Top
Twitter: https://twitter.com/nodesync_top
Telegram: https://t.me/nodesync_top
=========================================================================
EOF
}
logo_nodesync;
echo "===========Chavinci Network Install Easy======= " && sleep 1
read -r -p "Your desired RPC username: " username
read -r -p "Your desired RPC password: " password
if [[ -n $username ]] && [[ -n $password ]]; then
sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y
cd $HOME
wget https://github.com/chavinci-chain/chavinci-releases/releases/download/1.0.3/chavinci-linux.zip && unzip chavinci-linux.zip
mkdir $HOME/.chachain && cd $HOME/.chachain
tee chachain.conf > /dev/null << EOF
rpcuser=$username
rpcpassword=$password
daemon=1
testnet=1
staking=1
EOF
cd $HOME
./chad
echo -e "====================== Waiting ======================" && sleep 15
cd $HOME
./cha-cli addnode 157.245.19.145:22833 add
./cha-cli addnode 146.190.207.106:22833 add
./cha-cli addnode 139.59.207.170:22833 add
echo -e "====================== SETUP FINISHED ======================"
else
echo "Please enter user and pass (not empty). Install Again."
fi