Created
October 14, 2019 18:39
-
-
Save huserg/36a44aee3ac25e426234f18b5c74af2e to your computer and use it in GitHub Desktop.
Minecraft server launch python script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import sys | |
u_id = 1000 | |
ram = "8" | |
minimum_ram = "8" | |
screen_name = "FaFIndustriesMinecraftServer" | |
java_app_name = "spigot-1.13.2" | |
command = 'screen -dmS ' + screen_name + ' java -Xmx' + ram + 'G -Xms' + minimum_ram + 'G -XX:+UseConcMarkSweepGC -jar ' + java_app_name + '.jar' | |
try: | |
'java --version' | |
except OSError : | |
sys.exit('JAVA is not installed ! Please install it first and then rerun this program') | |
print 'Starting the ' + java_app_name + ' with ' + ram + ' Go RAM' | |
os.system(command) | |
print 'Server started in screen named ' + screen_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment