-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmultiple.sh
More file actions
86 lines (78 loc) · 3.34 KB
/
multiple.sh
File metadata and controls
86 lines (78 loc) · 3.34 KB
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
77
78
79
80
81
82
83
84
85
86
#!/bin/bash
# Ensure curl is installed
if ! command -v curl &> /dev/null; then
sudo apt update && sudo apt install curl -y
fi
# Load utility functions
source <(curl -s https://raw.githubusercontent.com/CPITMschool/Scripts/refs/heads/main/utils.sh)
clear
logo
# Main menu function
function main_menu {
while true; do
clear
anima
clear
logo
printBlue "● MULTIPLE
│
│
│ ┌───┬──────────────────────────────────────┐
├─┤ 1 │ Install │
│ ├───┼──────────────────────────────────────┤
├─┤ 2 │ Status check │
│ ├───┼──────────────────────────────────────┤
├─┤ 3 │ Delete │
│ ├───┼──────────────────────────────────────┤
└─┤ 0 │ Exit │
└───┴──────────────────────────────────────┘"
# Prompt for user input
read -p "Select an option: " choice
case $choice in
1)
printBlue "Installing Multiple..."
sudo apt update && sudo apt upgrade -y
ARCH=$(uname -m)
if [[ "$ARCH" == "x86_64" ]]; then
CLIENT_URL="https://cdn.app.multiple.cc/client/linux/x64/multipleforlinux.tar"
elif [[ "$ARCH" == "aarch64" ]]; then
CLIENT_URL="https://cdn.app.multiple.cc/client/linux/arm64/multipleforlinux.tar"
else
printRed "Unsupported architecture: $ARCH${NC}"
exit 1
fi
wget $CLIENT_URL -O multipleforlinux.tar
tar -xvf multipleforlinux.tar && cd multipleforlinux
chmod +x multiple-cli multiple-node
sudo echo "PATH=\$PATH:$(pwd)" >> ~/.bashrc
source ~/.bashrc
nohup ./multiple-node > output.log 2>&1 &
read -p "Enter your Account ID: " IDENTIFIER
read -p "Enter your PIN: " PIN
./multiple-cli bind --bandwidth-download 100000 --identifier "$IDENTIFIER" --pin "$PIN" --storage 200000000 --bandwidth-upload 100000
printGreen "Installation completed successfully!"
./multiple-cli status
;;
2)
printBlue "Checking node status..."
cd ~/multipleforlinux && ./multiple-cli status
;;
3)
printBlue "Deleting node..."
pkill -f multiple-node
sudo rm -rf $HOME/multipleforlinux
printGreen "Node deleted successfully."
;;
0)
printBlue "Exiting..."
break
;;
*)
printRed "Invalid choice, please try again."
;;
esac
read -p "Press Enter to return to the main menu..."
done
}
# Run the main menu
main_menu