forked from Ratomas/direwolf20
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlaunch.sh
36 lines (28 loc) · 916 Bytes
/
launch.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
#!/bin/bash
set -x
cd /data
if ! [[ -f serverinstall_95_2292 ]]; then
rm -fr config defaultconfigs kubejs libraries log4jfix mods resourcepacks minecraft-server-1.18.2.jar version.json start.sh run.* user_jvm_args.txt serverinstall_95_*
mv /serverinstall_95_2292 /data/serverinstall_95_2292
./serverinstall_95_2292 -auto
fi
if ! [[ "$EULA" = "false" ]] || grep -i true eula.txt; then
echo "eula=true" > eula.txt
else
echo "You must accept the EULA by in the container settings."
exit 9
fi
if [[ -n "$MOTD" ]]; then
sed -i "/motd\s*=/ c motd=$MOTD" server.properties
fi
if [[ -n "$LEVEL" ]]; then
sed -i "/level-name\s*=/ c level-name=$LEVEL" server.properties
fi
if [[ -n "$LEVELTYPE" ]]; then
sed -i "/level-type\s*=/ c level-type=$LEVELTYPE" server.properties
fi
echo "$JVM_OPTS" > user_jvm_args.txt
if [[ -n "$OPS" ]]; then
echo $OPS | awk -v RS=, '{print}' >> ops.txt
fi
./start.sh