vericudebuget commited on
Commit
0cacc72
·
verified ·
1 Parent(s): b005bb5

Update start.sh

Browse files
Files changed (1) hide show
  1. start.sh +22 -21
start.sh CHANGED
@@ -1,22 +1,23 @@
1
- #!/bin/bash
2
-
3
- # Debug: Show current directory and files
4
- echo "Debug: Current dir: $(pwd)"
5
- echo "Debug: Files in /opt/minecraft: $(ls -l /opt/minecraft)"
6
-
7
- # Debug: Check Java version
8
- echo "Debug: Java version:"
9
- java -version
10
-
11
- # Run dummy HTTP server in background (quiet output)
12
- python3 -m http.server 7860 > /dev/null 2>&1 &
13
-
14
- # Run playit.gg in background (output goes to logs)
15
- playit --secret $PLAYIT_SECRET &
16
-
17
- # Wait a bit for playit to start (optional, helps with timing)
18
- sleep 5
19
-
20
- # Run Minecraft in FOREGROUND (so logs show in HF)
21
- echo "Starting Minecraft server..."
 
22
  java -Xmx12G -Xms1G -jar server.jar nogui || echo "Error: Minecraft failed with exit code $?"
 
1
+ #!/bin/bash
2
+
3
+ # Debug: Show current directory and files
4
+ echo "Debug: Current dir: $(pwd)"
5
+ echo "Debug: Files in /opt/minecraft: $(ls -l /opt/minecraft)"
6
+
7
+ # Debug: Check Java version
8
+ echo "Debug: Java version:"
9
+ java -version
10
+
11
+ # Run dummy HTTP server in background (quiet output)
12
+ # This will serve the directory listing on port 7860
13
+ python3 -m http.server 7860 > /dev/null 2>&1 &
14
+
15
+ # Run playit.gg in background (output goes to logs)
16
+ playit --secret $PLAYIT_SECRET &
17
+
18
+ # Wait a bit for playit to start (optional, helps with timing)
19
+ sleep 5
20
+
21
+ # Run Minecraft in FOREGROUND (so its logs show in Hugging Face)
22
+ echo "Starting Minecraft server..."
23
  java -Xmx12G -Xms1G -jar server.jar nogui || echo "Error: Minecraft failed with exit code $?"