tripleS-Dev commited on
Commit
b3c2dfa
โ€ข
1 Parent(s): 3dcfbab
Files changed (1) hide show
  1. main.py +6 -0
main.py CHANGED
@@ -1,6 +1,8 @@
1
  import subprocess
2
  import socket
3
  import requests
 
 
4
 
5
  # ๋‚ด๋ถ€ IP ํ™•์ธ
6
  hostname = socket.gethostname()
@@ -18,6 +20,9 @@ except requests.exceptions.RequestException as e:
18
  # Java ์‹คํ–‰ ํŒŒ์ผ ๊ฒฝ๋กœ
19
  java_executable = "./jdk-22.0.1/bin/java" # ์••์ถ• ํ‘ผ ์ž๋ฐ” ํŒŒ์ผ์˜ ๊ฒฝ๋กœ
20
 
 
 
 
21
  # Minecraft ์„œ๋ฒ„ JAR ํŒŒ์ผ ๊ฒฝ๋กœ
22
  minecraft_server_jar = "./paper-1.20.6-140.jar"
23
 
@@ -28,6 +33,7 @@ command = [
28
  "-Xms10240M", # ์ดˆ๊ธฐ ํž™ ๋ฉ”๋ชจ๋ฆฌ ์„ค์ • (์˜ˆ: 10240MB)
29
  "-jar",
30
  minecraft_server_jar,
 
31
  ]
32
 
33
  # ์„œ๋ฒ„ ์‹œ์ž‘
 
1
  import subprocess
2
  import socket
3
  import requests
4
+ import os
5
+ import stat
6
 
7
  # ๋‚ด๋ถ€ IP ํ™•์ธ
8
  hostname = socket.gethostname()
 
20
  # Java ์‹คํ–‰ ํŒŒ์ผ ๊ฒฝ๋กœ
21
  java_executable = "./jdk-22.0.1/bin/java" # ์••์ถ• ํ‘ผ ์ž๋ฐ” ํŒŒ์ผ์˜ ๊ฒฝ๋กœ
22
 
23
+ # ํŒŒ์ผ์— ์‹คํ–‰ ๊ถŒํ•œ ๋ถ€์—ฌ
24
+ os.chmod(java_executable, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
25
+
26
  # Minecraft ์„œ๋ฒ„ JAR ํŒŒ์ผ ๊ฒฝ๋กœ
27
  minecraft_server_jar = "./paper-1.20.6-140.jar"
28
 
 
33
  "-Xms10240M", # ์ดˆ๊ธฐ ํž™ ๋ฉ”๋ชจ๋ฆฌ ์„ค์ • (์˜ˆ: 10240MB)
34
  "-jar",
35
  minecraft_server_jar,
36
+ "nogui"
37
  ]
38
 
39
  # ์„œ๋ฒ„ ์‹œ์ž‘