stxmap-rank-shell 1.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,60 @@
1
+ Crontab_file="/usr/bin/crontab"
2
+ Green_font_prefix="\033[32m"
3
+ Red_font_prefix="\033[31m"
4
+ Green_background_prefix="\033[42;37m"
5
+ Red_background_prefix="\033[41;37m"
6
+ Font_color_suffix="\033[0m"
7
+ Info="[${Green_font_prefix}信息${Font_color_suffix}]"
8
+ Error="[${Red_font_prefix}错误${Font_color_suffix}]"
9
+ Tip="[${Green_font_prefix}注意${Font_color_suffix}]"
10
+
11
+ check_root() {
12
+ [[ $EUID != 0 ]] && echo -e "${Error} 当前非ROOT账号(或没有ROOT权限), 无法继续操作, 请更换ROOT账号或使用 ${Green_background_prefix}sudo su${Font_color_suffix} 命令获取临时ROOT权限(执行后可能会提示输入当前账号的密码)。" && exit 1
13
+ }
14
+
15
+ install_ziesha_bazuka_and_run() {
16
+ check_root
17
+ sudo apt-get update && sudo apt-get upgrade
18
+ sudo apt install -y build-essential libssl-dev cmake curl git cargo
19
+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
20
+ git clone https://github.com/ziesha-network/bazuka
21
+ source "$HOME/.cargo/env"
22
+ cd bazuka
23
+ cargo install --path .
24
+ bazuka init --network groth-6 --bootstrap 65.108.193.133:8765
25
+ echo -e "\n"
26
+ read -e -p "请保存上面创建好的钱包助记词私钥,然后输入你的discord帐号:" DISCORD_ACCOUNT
27
+ bazuka node start --discord-handle "$DISCORD_ACCOUNT"
28
+ }
29
+
30
+ update_ziesha_bazuka_and_run() {
31
+ rm -rf ~/.bazuka
32
+ cd ~
33
+ cd bazuka
34
+ git pull origin master
35
+ cargo update
36
+ cargo install --path .
37
+ read -e -p "请输入你的discord帐号:" DISCORD_ACCOUNT
38
+ bazuka node start --discord-handle "$DISCORD_ACCOUNT"
39
+ }
40
+
41
+ echo && echo -e " ${Red_font_prefix}ziesha_network 一键安装脚本${Font_color_suffix} by \033[1;35moooooyoung\033[0m
42
+ 此脚本完全免费开源, 由推特用户 ${Green_font_prefix}@ouyoung11开发${Font_color_suffix},
43
+ 欢迎关注, 如有收费请勿上当受骗。
44
+ ———————————————————————
45
+ ${Green_font_prefix} 1.安装Ziesha节点且生成钱包并运行 ${Font_color_suffix}
46
+ ${Green_font_prefix} 2.更新Ziesha节点版本并重新运行 ${Font_color_suffix}
47
+ ———————————————————————" && echo
48
+ read -e -p " 请参照教程执行以上步骤,请输入数字 [1-2]:" num
49
+ case "$num" in
50
+ 1)
51
+ install_ziesha_bazuka_and_run
52
+ ;;
53
+ 2)
54
+ update_ziesha_bazuka_and_run
55
+ ;;
56
+ *)
57
+ echo
58
+ echo -e " ${Error} 请输入正确的数字"
59
+ ;;
60
+ esac