-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuls.sh
executable file
·266 lines (240 loc) · 6.52 KB
/
uls.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
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
#!/usr/bin/env bash
echo "Starting"
# depends -----------------------------------
echo "Installing depends..."
read -p "Would you like to install additional dependencies? " -n 1 -r
if [[ $REPLY =~ ^[Yy]$ ]]
then
if [ "$EUID" -ne 0 ]
then
echo ""
echo "Please run as root"
exit
fi
apt update
sudo apt install aptitude git wget toilet figlet neofetch #additional depends here
fi
# -------------------------------------------
# terminal setup ----------------------------
clear
neofetch
sleep 5
clear
figlet UltimateLinux v1.0
# -------------------------------------------
echo "type "help" for help"
while true
do
read -p "ULS> "
if [[ $REPLY = help ]]
then
echo "Commands:"
echo "help - lists commands"
echo "quit - exits uls"
echo "clear - clears the console or terminal"
echo "update - updates the running linux distro"
echo "ulsupdate - updates ULS"
echo "ulsrestart - restarts uls"
echo "listpackages - lists all installed packages"
echo "install list - used to install applications (apt for beginners)"
echo "minecraft - installs and runs minecraft"
echo "glowstone - installs and compiles glowstone minecraft server"
echo "getjosephworks - installs all of josephworks's repositories"
fi
if [[ $REPLY = quit ]]
then
exit
fi
if [[ $REPLY = exit ]]
then
exit
fi
if [[ $REPLY = clear ]]
then
clear
fi
if [[ $REPLY = minecraft ]]
then
if [ "$EUID" -ne 0 ]
then
echo ""
echo "Please run as root"
exit
fi
sudo apt install default-jre default-jdk -y
wget http://s3.amazonaws.com/Minecraft.Download/launcher/Minecraft.jar
rm Minecraft.jar.*
java -jar Minecraft.jar
fi
if [[ $REPLY = glowstone ]]
then
echo "Make sure maven and java are installed."
echo "To install maven, run "install maven" followed buy "install java" in ULS."
sleep 3
git clone https://github.com/GlowstoneMC/Glowstone.git
cd Glowstone
./scripts/build.sh
sleep 3
mkdir mcserver
mv target/glowstone.jar ../mcserver/glowstone.jar
cd ..
cd mcserver
java -Xms128M -Xmx1G -XX:+UseG1GC -jar glowstone.jar
cd ..
fi
if [[ $REPLY = getjosephworks ]]
then
mkdir josephworks
cd josephworks
echo "Cloning all Repositories to ./josephworks"
git clone https://github.com/josephworks/AtomMC
git clone https://github.com/josephworks/HelpDesk
git clone https://github.com/josephworks/BungeeSpigot
git clone https://github.com/josephworks/Scripts
git clone https://github.com/josephworks/startxcli.sh
git clone https://github.com/josephworks/files
git clone https://github.com/josephworks/McEmeraldtnt
git clone https://github.com/josephworks/McAdventure
git clone https://github.com/josephworks/ultimatelinux.sh
git clone https://github.com/josephworks/josephworks
git clone https://github.com/josephworks/josephworks.github.io
git clone https://github.com/josephworks/MinecraftMultiversion
git clone https://github.com/josephworks/McCompile
git clone https://github.com/josephworks/Gwen-Remade
git clone https://github.com/josephworks/CMDWorkspaceTools
git clone https://github.com/josephworks/serverbuilder
git clone https://github.com/josephworks/WebIDE
git clone https://github.com/josephworks/JenkinsServer
git clone https://github.com/josephworks/Registry-Edits
git clone https://github.com/josephworks/PaperCraft
git clone https://github.com/josephworks/pythonws
git clone https://github.com/josephworks/SpigotCraft
git clone https://github.com/josephworks/ThermosServer
git clone https://github.com/josephworks/Gideon
git clone https://github.com/josephworks/Windows-subsystem-for-Linux
git clone https://github.com/josephworks/Google-Chrome-Linux-root-fix
git clone https://github.com/josephworks/Powershell-policy-fix
echo "Finished the cloning process"
fi
if [[ $REPLY = update ]]
then
if [ "$EUID" -ne 0 ]
then
echo ""
echo "Please run as root"
exit
fi
sudo aptitude update && sudo aptitude upgrade
fi
if [[ $REPLY = ulsupdate ]]
then
cd ..
rm -rf ultimatelinux.sh
git clone https://github.com/josephworks/ultimatelinux.sh
cd ultimatelinux.sh
echo "please restart ULS"
fi
if [[ $REPLY = ulsrestart ]]
then
clear
uls.sh
fi
if [[ $REPLY = listpackages ]]
then
dpkg -l
fi
if [[ $REPLY = install ]]
then
echo "Invalid Usage: install [App]"
echo "To see a list of apps you can install, run "install list""
fi
if [[ $REPLY = "install list" ]]
then
echo "Installable Apps:"
echo "java"
echo "maven"
echo "npm"
echo "nodejs"
echo "docker"
echo "webmin"
echo "jenkins"
fi
if [[ $REPLY = "install java" ]]
then
if [ "$EUID" -ne 0 ]
then
echo ""
echo "Please run as root"
exit
fi
sudo apt install default-jre default-jdk -y
fi
if [[ $REPLY = "install maven" ]]
then
if [ "$EUID" -ne 0 ]
then
echo ""
echo "Please run as root"
exit
fi
apt install maven -y
fi
if [[ $REPLY = "install npm" ]]
then
if [ "$EUID" -ne 0 ]
then
echo ""
echo "Please run as root"
exit
fi
sudo apt install npm -y
fi
if [[ $REPLY = "install nodejs" ]]
then
if [ "$EUID" -ne 0 ]
then
echo ""
echo "Please run as root"
exit
fi
sudo apt install npm -y
fi
if [[ $REPLY = "install docker" ]]
then
if [ "$EUID" -ne 0 ]
then
echo ""
echo "Please run as root"
exit
fi
sudo apt install docker.io -y
fi
if [[ $REPLY = "install webmin" ]]
then
if [ "$EUID" -ne 0 ]
then
echo ""
echo "Please run as root"
exit
fi
wget http://prdownloads.sourceforge.net/webadmin/webmin_1.900_all.deb
sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
sudo dpkg -i webmin_1.900_all.deb
fi
if [[ $REPLY = "install jenkins" ]]
then
if [ "$EUID" -ne 0 ]
then
echo ""
echo "Please run as root"
exit
fi
wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
sudo echo "# Jenkins install - by UltimateLinux" > /etc/apt/sources.list
sudo echo "deb https://pkg.jenkins.io/debian binary/" > /etc/apt/sources.list
sudo apt-get update && sudo apt-get install jenkins
echo "DO NOT RUN THIS COMMAND AGAIN!!!"
echo "It will add another duplicate entry to your sources.list"
echo "that might break APT or DPKG"
fi
done