forked from debojitsantra/BedrockServerTermux
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_env.sh
More file actions
52 lines (40 loc) · 1.48 KB
/
setup_env.sh
File metadata and controls
52 lines (40 loc) · 1.48 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
#!/bin/bash
# Update and upgrade packages
apt update -y && apt upgrade -y
# Install essential packages
apt install -y git box64 sudo || {
echo "❌ Failed to install required packages. Please check your internet connection."
exit 1
}
# Clean up old Playit repository keys if they exist
sudo apt-key del '16AC CC32 BD41 5DCC 6F00 D548 DA6C D75E C283 9680' 2>/dev/null
sudo rm -f /etc/apt/sources.list.d/playit-cloud.list
# Add Playit Cloud repository
curl -SsL https://playit-cloud.github.io/ppa/key.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/playit.gpg >/dev/null
echo "deb [signed-by=/etc/apt/trusted.gpg.d/playit.gpg] https://playit-cloud.github.io/ppa/data ./" | sudo tee /etc/apt/sources.list.d/playit-cloud.list
# Update package lists again
sudo apt update -y
# Install Playit
apt install -y playit || {
echo "❌ Failed to install Playit. Please check your repository settings."
exit 1
}
# Download and set up the Minecraft Bedrock server
wget -q --show-progress https://files.catbox.moe/21uwft.zip || {
echo "❌ Failed to download server.zip. Check your internet connection or the link."
exit 1
}
unzip -o 21uwft.zip || {
echo "❌ Failed to unzip server.zip. Ensure there's enough storage."
exit 1
}
# Configure server files
cd Xboyes || {
echo "❌ 'Xboyes' folder not found. Unzip process may have failed."
exit 1
}
chmod +x bedrock_server start.sh
# Return to home directory
cd
# Final message
echo -e "\n✅ Environment setup complete!"