forked from lordofwizard/mcserver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstallJava
More file actions
executable file
·144 lines (117 loc) · 2.97 KB
/
installJava
File metadata and controls
executable file
·144 lines (117 loc) · 2.97 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#!/bin/bash
export THIS_DIR=$PWD
install_server () {
choice=$1
if [[ -z $choice ]]
then
echo -e "\n> Installing Vanilla..."
cd JavaInstallScripts
chmod +x *
./VanillaInstall
errorno=${?}
if [ $errorno -eq 1 ]
then
cd $THIS_DIR
install_server $choice
fi
# Vanilla
elif [[ $choice == 1 ]]
then
echo -e "\n> Installing Vanilla..."
cd JavaInstallScripts
chmod +x *
./VanillaInstall
errorno=${?}
if [ $errorno -eq 1 ]
then
cd $THIS_DIR
install_server $choice
fi
# Paper
elif [[ $choice == 2 ]]
then
echo "> Installing Paper..."
cd JavaInstallScripts
chmod +x *
./PaperInstall
# Forge
elif [[ $choice == 3 ]]
then
echo "> Installing Forge..."
cd JavaInstallScripts
chmod +x *
./ForgeInstall
# Sponge
elif [[ $choice == 4 ]]
then
echo "> Installing Sponge..."
cd JavaInstallScripts
chmod +x *
./SpongeInstall
# Fabric
elif [[ $choice == 5 ]]
then
echo "> Installing Fabric..."
cd JavaInstallScripts
chmod +x *
./FabricInstall
elif [[ $choice == 6 ]];then
echo "> Installing Spigot..."
cd JavaInstallScripts
chmod +x *
./SpigotInstall
elif [[ $choice == 7 ]];then
echo "> Installing Bungeecord..."
cd JavaInstallScripts
chmod +x *
./BungeecordInstall
# Invaild Input
else
echo "Invaild Responds! Please try again"
./installJava
fi
}
#Installing all the dependencise
sudo apt install -y -qq screen neofetch
echo "export PATH=$PATH:/some/new/path" > ~/.profile
echo "> Dependencies Installtion Completed!"
#Downloading ngrok && Downloading Minecraft Server
mkdir server
echo ""
echo "-- Pick the following Server type: --"
echo "Type [1] Create Vanilla Server"
echo "Type [2] Create Paper Server"
echo "Type [3] Create Forge Server"
echo "Type [4] Create Sponge Server"
echo "Type [5] Create Fabric Server"
echo "Type [6] Create Spigot Server(COMPILE)"
echo "Type [7] Create Bungeecord Server(latest)"
choiceForServer=1
read choiceForServer
install_server $choiceForServer
# Backup install playit.gg in case if first one doesn't download
echo "> Installing Playit.gg..."
cd ..
#wget "https://playit.gg/downloads/playit-linux_64-0.4.2-rc1" -O playit
#wget -q "https://playit.gg/downloads/playit-linux_64-0.4.6" -O playit
wget -q "https://new.playit.gg/downloads/playit-0.7.0-beta" -O playit
chmod +x playit
echo "> Playit.gg Installation Completed!"
echo ""
echo "-- Do you want to start the server now? --"
echo "Type [1] for Yes"
echo "Type [2] for No"
StartServer=2
read StartServer
if [[ -z $StartServer ]]; then
echo "> By Default, you selected 'No'."
echo "> You can start the server by do ./startserver"
elif [[ $StartServer == 1 ]]; then
./startserver
elif [[ $StartServer == 2 ]]; then
echo "You picked 'No'."
echo "> You can start the server by do ./startserver"
else
echo "> By Default, you selected 'No'."
echo "> You can start the server by do ./startserver"
fi