-
Notifications
You must be signed in to change notification settings - Fork 27
/
Bridge_Node.sh
61 lines (49 loc) · 3.74 KB
/
Bridge_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
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
#!/bin/bash
echo -e "\033[0;33m"
echo "==========================================================================================================================="
echo " "
echo " ██████╗ ██████╗ ███╗ ██╗████████╗██████╗ ██╗██████╗ ██╗ ██╗████████╗██╗ ██████╗ ███╗ ██╗██████╗ █████╗ ██████╗ ";
echo " ██╔════╝██╔═══██╗████╗ ██║╚══██╔══╝██╔══██╗██║██╔══██╗██║ ██║╚══██╔══╝██║██╔═══██╗████╗ ██║██╔══██╗██╔══██╗██╔═══██╗";
echo " ██║ ██║ ██║██╔██╗ ██║ ██║ ██████╔╝██║██████╔╝██║ ██║ ██║ ██║██║ ██║██╔██╗ ██║██║ ██║███████║██║ ██║";
echo " ██║ ██║ ██║██║╚██╗██║ ██║ ██╔══██╗██║██╔══██╗██║ ██║ ██║ ██║██║ ██║██║╚██╗██║██║ ██║██╔══██║██║ ██║";
echo " ╚██████╗╚██████╔╝██║ ╚████║ ██║ ██║ ██║██║██████╔╝╚██████╔╝ ██║ ██║╚██████╔╝██║ ╚████║██████╔╝██║ ██║╚██████╔╝";
echo " ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝╚═╝╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ";
echo -e "\033[0;33m"
echo "==========================================================================================================================="
sleep 1
source $HOME/.bash_profile
#function Run Celestia Bridge Node
echo -e "\e[1m\e[32mSetting Up A Celestia Bridge Node \e[0m" && sleep 1
cd $HOME
rm -rf celestia-node
git clone https://github.com/celestiaorg/celestia-node.git
cd celestia-node/
git checkout tags/v0.3.0-rc1
make install
sleep 3
celestia bridge init --core.remote tcp://localhost:26657 --core.grpc tcp://localhost:9090
sleep 3
sudo tee <<EOF >/dev/null /etc/systemd/system/celestia-bridge.service
[Unit]
Description=celestia-bridge Cosmos daemon
After=network-online.target
[Service]
User=$USER
ExecStart=$HOME/go/bin/celestia bridge start
Restart=on-failure
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
EOF
sleep 3
sudo systemctl daemon-reload
sudo systemctl enable celestia-bridge
sudo systemctl restart celestia-bridge
echo "==========================================================================================================================="
echo -e '\e[32mCheck your celestia-bridge node status\e[39m' && sleep 3
if [[ `service celestia-bridge status | grep active` =~ "running" ]]; then
echo -e "Your celestia-bridge node \e[32minstalled and running normally\e[39m!"
else
echo -e "Your celestia-bridge node\e[31mwas failed installed\e[39m, Please Re-install."
fi