-
Notifications
You must be signed in to change notification settings - Fork 0
/
Minecraft-Server-Skript.sh
594 lines (454 loc) · 19.4 KB
/
Minecraft-Server-Skript.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
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
#!/bin/bash
# Gucken ob der Benutzer root ist
if [ "$(id -u)" != "0" ]; then
echo $(tput setaf 1)Bitte wechseln Sie zu einem Admin/Root Benutzer$(tput sgr0)
exit 1;
fi
# Hier das Verzeichniss eintragen wo der der Server insterliert werden soll!
ServerVerzeichniss="Server"
SCRIPTNAME="MC - Server"
LOCK=".lock-mc"
# Fehler Codes
FEHLER1="Diese Version enthält nicht gültige Zeichen! FehlerCode(01)"
FEHLER2="Fehler es wurde keine Spigot-Datei gefunden. FehlerCode(02)"
FEHLER3="Server wurde nicht gestartet da die Startdatei nicht gefunden wurde. FehlerCode(03)"
FEHLER4="In dem Verzeichnis befinden sich bereits Dateien. FehlerCode(04)"
content=$(wget https://raw.githubusercontent.com/lofentblack/Minecraft-Skript/refs/heads/main/version.txt -q -O -)
Version=$content
checkUpdate() {
content=$(wget https://raw.githubusercontent.com/lofentblack/Minecraft-Skript/refs/heads/main/version.txt -q -O -)
version=$content
# Eingabedatei
AnzahlZeilen=$(wc -l ${LOCK} | awk ' // { print $1; } ')
for LaufZeile in $(seq 1 ${AnzahlZeilen})
do
Zeile=$(sed -n "${LaufZeile}p" ${LOCK})
Test=${Zeile}
if [[ "$Test" == *"version"* ]]; then
if [[ "$Test" == *"version"* ]]; then
var1=$(sed 's/version=//' <<< "$Test")
var2=$(sed 's/^.//;s/.$//' <<< "$var1")
SkriptVersion=$var2
fi
fi
done
if ! [[ $version == $SkriptVersion ]]; then
sudo apt-get install wget -y
clear
clear
echo $(tput setaf 3)"Update von Version "$SkriptVersion" zu "$version"."
echo "$(tput sgr0)"
wget https://raw.githubusercontent.com/lofentblack/Minecraft-Skript/refs/heads/main/Minecraft-Server-Skript.sh -O Minecraft.new.sh
rm $LOCK
chmod 775 Minecraft.new.sh
rm Minecraft-Server-Skript.sh
mv Minecraft.new.sh Minecraft-Server-Skript.sh
fi
}
checkUpdate
lofentblackDEScript() {
rot="$(tput setaf 1)"
gruen="$(tput setaf 2)"
gelb="$(tput setaf 3)"
dunkelblau="$(tput setaf 4)"
lila="$(tput setaf 5)"
turkies="$(tput setaf 6)"
# Notwendige Packete
installations_packete() {
apt-get install sudo -y
sudo apt-get update -y
sudo apt-get install screen -y
screen=instalations_packete_lb.de_script
screen -Sdm $screen apt-get install figlet -y && screen -Sdm $screen sudo apt-get upgrade -y
sleep 10
echo "Notwendige Pakete Installiert"
sleep 1
clear
clear
echo $gruen"Bitte starte das Script neu!"
echo "$(tput sgr0)"
}
LOGO() {
clear
clear
echo "$(tput setaf 2)"
figlet -f slant -c $SCRIPTNAME
echo $rot
echo "Mit dem Ausführen des Skripts akzeptierst du der Lizenz von LofentBlack.de/licence und die Minecraft Eula."
echo "$(tput sgr0)"
}
# Script Verzeichniss
reldir=`dirname $0`
cd $reldir
SCRIPTPATH=`pwd`
clear
clear
if [ -s $SCRIPTPATH/$LOCK ]; then
echo "$(tput setaf 2)"
figlet -f slant -c $SCRIPTNAME
echo $rot
echo "Mit dem Ausführen des Skripts akzeptierst du der Lizenz von LofentBlack.de/licence und die Minecraft Eula."
echo "$(tput sgr0)"
echo "1) Minecraft Server starten"
echo "2) Minecraft Server stoppen"
echo "3) Minecraft Server installieren(spigot)"
echo "4) BungeeCord Server installieren"
echo "5) Beenden"
read -p "Was möchten Sie machen?: " machen
if ! [ -z $machen ] && [ $machen == "1" ]; then
LOGO
read -p "Bitte geben die nun den Namen des Servers an: " name1
if [ -d $SCRIPTPATH/$ServerVerzeichniss/$name1 ]; then
if [ -f $SCRIPTPATH/$ServerVerzeichniss/$name1/restart.sh ]; then
LOGO
cd $SCRIPTPATH/$ServerVerzeichniss/$name1/
screen -Sdm name1 ./restart.sh
echo "Server wurde gestartet"
sleep 1
else
echo $FEHLER3
sleep 4
fi
else
echo "Das Verzeichnis existiert nicht"
sleep 3
fi
fi
if ! [ -z $machen ] && [ $machen == "2" ]; then
LOGO
read -p "Bitte geben die nun den Namen des Servers an: " name
if screen -list | grep -q "$name"; then
screen -S $name -X quit
screen -wipe
LOGO
echo "Der Server $name wurde Erfolgreich Beendet"
else
LOGO
echo "Der Server ist Offline oder existiert nicht!"
fi
fi
if ! [ -z $machen ] && [ $machen == "3" ]; then
if ! [ -d $SCRIPTPATH/$ServerVerzeichniss/ ]; then
sudo mkdir $SCRIPTPATH/$ServerVerzeichniss/
fi
LOGO
read -p "Bitte gebe Sie den Namen des neuen Servers ein (möglichst keine Sonderzeichen): " name
if ! [ -d $SCRIPTPATH/$ServerVerzeichniss/$name ] || [ -z "$(ls -A $SCRIPTPATH/$ServerVerzeichniss/$name)" ]; then
if [ -z $SCRIPTPATH/$ServerVerzeichniss/$name ]; then
LOGO
else
LOGO
sudo mkdir $SCRIPTPATH/$ServerVerzeichniss/$name
echo "Das Verzeichnis" /$ServerVerzeichniss/$name "wurde erstellt"
fi
cd $SCRIPTPATH/$ServerVerzeichniss/$name
echo ""
echo "Geben Sie nun die Server Version an z. B. "'"1.8.8"'" oder "'"1.15"'""
read -p "Welche Version soll der Server haben: " Version
ungueltig=$(echo "$Version" | sed 's/[^0-9,.]//g')
if [ $Version == "1.4.6" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.4.6-R0.4-SNAPSHOT.jar
elif [ $Version == "1.4.7" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.4.7-R1.1-SNAPSHOT.jar
elif [ $Version == "1.5.1" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.5.1-R0.1-SNAPSHOT.jar
elif [ $Version == "1.5.2" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.5.2-R1.1-SNAPSHOT.jar
elif [ $Version == "1.6.2" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.6.2-R1.1-SNAPSHOT.jar
elif [ $Version == "1.6.4" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.6.4-R2.1-SNAPSHOT.jar
elif [ $Version == "1.7.2" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.7.2-R0.4-SNAPSHOT-1339.jar
elif [ $Version == "1.7.5" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.7.5-R0.1-SNAPSHOT-1387.jar
elif [ $Version == "1.7.8" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.7.8-R0.1-SNAPSHOT.jar
elif [ $Version == "1.7.9" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.7.9-R0.2-SNAPSHOT.jar
elif [ $Version == "1.7.10" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.7.10-SNAPSHOT-b1657.jar
elif [ $Version == "1.8.3" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.8.3-R0.1-SNAPSHOT-latest.jar
elif [ $Version == "1.8.4" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.8.4-R0.1-SNAPSHOT-latest.jar
elif [ $Version == "1.8.5" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.8.5-R0.1-SNAPSHOT-latest.jar
elif [ $Version == "1.8.6" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.8.6-R0.1-SNAPSHOT-latest.jar
elif [ $Version == "1.8.7" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.8.7-R0.1-SNAPSHOT-latest.jar
elif [ $Version == "1.8.8" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.8.8-R0.1-SNAPSHOT-latest.jar
elif [ $Version == "1.9.2" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.9.2-R0.1-SNAPSHOT-latest.jar
elif [ $Version == "1.9.4" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.9.4-R0.1-SNAPSHOT-latest.jar
elif [ $Version == "1.10" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.10-R0.1-SNAPSHOT-latest.jar
elif [ $Version == "1.10" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.10.2-R0.1-SNAPSHOT-latest.jar
elif [ $Version == "1.10.2" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.10.2-R0.1-SNAPSHOT-latest.jar
elif [ $Version == "1.11" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.11.jar
elif [ $Version == "1.11.1" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.11.1.jar
elif [ $Version == "1.11.2" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.11.2.jar
elif [ $Version == "1.12" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.12.jar
elif [ $Version == "1.12.1" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.12.1.jar
elif [ $Version == "1.12.2" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.12.2.jar
elif [ $Version == "1.13" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.13.jar
elif [ $Version == "1.13.1" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.13.1.jar
elif [ $Version == "1.13.2" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.13.2.jar
elif [ $Version == "1.14" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.14.jar
elif [ $Version == "1.14" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.14.jar
elif [ $Version == "1.14.1" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.14.1.jar
elif [ $Version == "1.14.2" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.14.2.jar
elif [ $Version == "1.14.3" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.14.3.jar
elif [ $Version == "1.14.4" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.14.4.jar
elif [ $Version == "1.15" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.15.jar
elif [ $Version == "1.15.1" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.15.1.jar
elif [ $Version == "1.15.2" ]; then
screen -Sdm $screen sudo apt-get install openjdk-8-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.15.2.jar
elif [ $Version == "1.16.1" ]; then
screen -Sdm $screen sudo apt-get install openjdk-15-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.16.1.jar
elif [ $Version == "1.16.2" ]; then
screen -Sdm $screen sudo apt-get install openjdk-15-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.16.2.jar
elif [ $Version == "1.16.3" ]; then
screen -Sdm $screen sudo apt-get install openjdk-15-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.16.3.jar
elif [ $Version == "1.16.4" ]; then
screen -Sdm $screen sudo apt-get install openjdk-15-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.16.4.jar
elif [ $Version == "1.16.5" ]; then
screen -Sdm $screen sudo apt-get install openjdk-15-jdk -y
wget https://cdn.getbukkit.org/spigot/spigot-1.16.5.jar
elif ! [ "$ungueltig" == "" ]; then
screen -Sdm $screen sudo apt-get install openjdk-15-jdk -y
wget https://download.getbukkit.org/spigot/spigot-$Version.jar
else
LOGO
echo $FEHLER1
exit 1;
fi
clear
cd $SCRIPTPATH/$ServerVerzeichniss/$name
> start.sh
> restart.sh
> eula.txt
if [ -s spigot*.jar ]; then
if ! [ spigot*.jar == spigot-$Version.jar ]; then
mv spigot*.jar spigot-$Version.jar
fi
else
echo $FEHLER2
exit 1;
fi
MinimalScript() {
read -p "Wie viel GB RAM soll der Server minimal haben: " Minimal
if [ $Minimal -ge 1 ]; then
echo Minimal = $Minimal
else
clear
clear
echo "Zahl darf nicht kleiner als 1 sein oder Buchstaben/Sonderzeichen enthalten!"
MinimalScript
fi
}
MinimalScript
MaximalScript() {
read -p "Wie viel GB RAM soll der Server maximal haben: " Maximal
if [ $Maximal -ge $Minimal ]; then
echo Maximal = $Maximal
else
clear
clear
echo Zahl darf nicht kleiner als $Minimal sein oder Buchstaben/Sonderzeichen Enthalten!
MaximalScript
fi
}
MaximalScript
echo "screen -S "$name" ./restart.sh" > $SCRIPTPATH/$ServerVerzeichniss/$name/start.sh
echo -e "#!/bin/sh\nwhile true\ndo\njava "-Xms"$Minimal"G -Xmx"$Maximal"G" -jar spigot-"$Version".jar nogui\necho "Wenn Sie den Server komplett stoppen wollen druecken Sie, Strg + C bevor die Zeit ablauft"\necho "Neustart in:"\nfor i in 5 4 3 2 1\ndo\necho "'$i...'"\nsleep 1\ndone\necho "Neustart Jetzt!"\ndone" > $SCRIPTPATH/$ServerVerzeichniss/$name/restart.sh
date=`date`
echo -e "#By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).\n#"$date"\neula=true" > $SCRIPTPATH/$ServerVerzeichniss/$name/eula.txt
chmod +x $SCRIPTPATH/$ServerVerzeichniss/$name/start.sh
chmod +x $SCRIPTPATH/$ServerVerzeichniss/$name/restart.sh
if [ $Maximal -ge 4 ]; then
Empfohlen_Spieler="10+"
elif [ $Maximal -le 3 ]; then
if [ $Maximal -le 1 ]; then
Empfohlen_Spieler="1-4"
else
Empfohlen_Spieler="5-10"
fi
else
Empfohlen_Spieler="Null"
fi
clear
clear
echo "--- Information zum erstellten Server ---"
echo ""
echo Screen-name: $name
echo Verzeichniss: $SCRIPTPATH/$ServerVerzeichniss/$name
echo "Minecraft-Version: $Version"
echo "Minimale RAM: "$Minimal"G"
echo "Maximale RAM: "$Maximal"G"
echo "Empfohlen Spieler zahl: "${Empfohlen_Spieler}
echo ""
echo "--- Information zum erstellten Server ---"
echo ""
read -p "Soll der Server gestartet werden (Y/N): " server
if [ $server = "y" ] || [ $server = "Y" ] || [ $server = "J" ] || [ $server = "j" ] || [ $server = "ja" ] || [ $server = "Ja" ] || [ $server = "Yes" ] || [ $server = "yes" ] || [ $server = "ok" ] || [ $server = "Ok" ] || [ $server = "OK" ] || [ $server = "oK" ] || [ $server = "JA" ] || [ $server = "jA" ] || [ $server = "YES" ] || [ $server = "YEs" ] || [ $server = "yES" ] || [ $server = "yeS" ] || [ $server = "YeS" ] || [ $server = "yES" ] || [ $server = "yEs" ]; then
cd /$SCRIPTPATH/$ServerVerzeichniss/$name/ && screen -Sdm $name ./restart.sh
echo "Server gestartet!"
else
echo "Server nicht gestartet"
fi
cd $SCRIPTPATH
else
$FEHLER4
fi
fi
if ! [ -z $machen ] && [ $machen == "4" ]; then
if ! [ -d $SCRIPTPATH/$ServerVerzeichniss/ ]; then
sudo mkdir $SCRIPTPATH/$ServerVerzeichniss/
fi
LOGO
read -p "Bitte gebe Sie den Namen des neuen BungeeCord Server ein (möglichst keine Sonderzeichen): " name
if ! [ -d $SCRIPTPATH/$ServerVerzeichniss/$name ]; then
sudo mkdir $SCRIPTPATH/$ServerVerzeichniss/$name
echo "Das Verzeichnis" /$ServerVerzeichniss/$name "wurde erstellt"
echo ""
cd $SCRIPTPATH/$ServerVerzeichniss/$name
wget https://ci.md-5.net/job/BungeeCord/lastSuccessfulBuild/artifact/bootstrap/target/BungeeCord.jar
clear
> start.sh
> restart.sh
> eula.txt
MinimalScript() {
read -p "Wie viel GB RAM soll der BungeeCord Server minimal haben: " Minimal
if [ $Minimal -ge 1 ]; then
echo Minimal = $Minimal
else
clear
clear
echo "Zahl darf nicht kleiner als 1 sein oder Buchstaben/Sonderzeichen enthalten!"
MinimalScript
fi
}
MinimalScript
MaximalScript() {
read -p "Wie viel GB RAM soll der BungeeCord Server maximal haben: " Maximal
if [ $Maximal -ge $Minimal ]; then
echo Maximal = $Maximal
else
echo Zahl darf nicht kleiner als $Minimal sein oder Buchstaben/Sonderzeichen Enthalten!
clear
clear
MaximalScript
fi
}
MaximalScript
echo "screen -S "$name" ./restart.sh" > $SCRIPTPATH/$ServerVerzeichniss/$name/start.sh
echo -e "#!/bin/sh\nwhile true\ndo\njava "-Xms"$Minimal"G -Xmx"$Maximal"G" -jar BungeeCord.jar nogui\necho "Wenn Sie den BungeeCord Server komplett stoppen wollen druecken Sie, Strg + C bevor die Zeit ablauft"\necho "Neustart in:"\nfor i in 5 4 3 2 1\ndo\necho "'$i...'"\nsleep 1\ndone\necho "Neustart Jetzt!"\ndone" > $SCRIPTPATH/$ServerVerzeichniss/$name/restart.sh
date=`date`
echo -e "#By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).\n#"$date"\neula=true" > $SCRIPTPATH/$ServerVerzeichniss/$name/eula.txt
chmod +x $SCRIPTPATH/$ServerVerzeichniss/$name/start.sh
chmod +x $SCRIPTPATH/$ServerVerzeichniss/$name/restart.sh
clear
clear
echo "--- Information zum erstellten BungeeCord Server ---"
echo ""
echo Screen-name: $name
echo Verzeichniss: $SCRIPTPATH/$ServerVerzeichniss/$name
echo "Minecraft-version: BungeeCord Server"
echo "Minimale RAM: "$Minimal"G"
echo "Maximale RAM: "$Maximal"G"
echo ""
echo "--- Information zum erstellten BungeeCord Server ---"
echo ""
read -p "Soll der BungeeCord Server gestartet werden (Y/N): " server
if [ $server = "y" ] || [ $server = "Y" ] || [ $server = "J" ] || [ $server = "j" ] || [ $server = "ja" ] || [ $server = "Ja" ] || [ $server = "Yes" ] || [ $server = "yes" ] || [ $server = "ok" ] || [ $server = "Ok" ] || [ $server = "OK" ] || [ $server = "oK" ] || [ $server = "JA" ] || [ $server = "jA" ] || [ $server = "YES" ] || [ $server = "YEs" ] || [ $server = "yES" ] || [ $server = "yeS" ] || [ $server = "YeS" ] || [ $server = "yES" ] || [ $server = "yEs" ]; then
cd /$SCRIPTPATH/$ServerVerzeichniss/$name/ && screen -Sdm $name ./restart.sh
echo "BungeeCord Server gestartet!"
else
echo "BungeeCord Server nicht gestartet"
fi
cd $SCRIPTPATH
else
echo "Das Verzeichnis existiert bereits!"
echo ""
fi
fi
if [ -z $machen ]; then
echo "Keine Zahl erkannt."
fi
if [[ $machen =~ ^[a-z,A-Z]+$ ]];then
echo "Bitte benutze keine Buchstaben"
fi
elif ! [ -s $SCRIPTPATH/$LOCK ]; then
> $LOCK
echo -e 'int=true\nversion="'$Version'"\n\n#Mit dieser Datei erkennt das Skript das alle notwendigen Pakete installiert worden sind.' > $SCRIPTPATH/$LOCK
installations_packete
fi
}
lofentblackDEScript