mirror of
https://github.com/dragonlock2/matthewtran.com.git
synced 2026-06-28 01:58:34 +00:00
wip4
This commit is contained in:
@@ -17,7 +17,10 @@ UIDS = {
|
||||
|
||||
PORTS = {
|
||||
"game": [
|
||||
"25565:25565",
|
||||
"25565:25565", # minecraft
|
||||
"19132:19132/udp", # minecraft_bedrock
|
||||
"19133:19133/udp",
|
||||
"7777:7777", # terraria
|
||||
],
|
||||
}
|
||||
|
||||
@@ -280,7 +283,6 @@ if __name__ == "__main__":
|
||||
# TODO add rest of containers
|
||||
# add core to nas group
|
||||
# TODO script to backup => restore backup if desired
|
||||
# TODO enable bedrock => check idle cpu
|
||||
# TODO reduce disk logging?
|
||||
|
||||
|
||||
|
||||
+17
-1
@@ -10,6 +10,8 @@ SOURCE_DIR = "/var/source"
|
||||
IMAGES = {
|
||||
"game": [
|
||||
"minecraft",
|
||||
"minecraft_bedrock",
|
||||
"terraria",
|
||||
],
|
||||
}
|
||||
|
||||
@@ -17,7 +19,21 @@ def generate(cfg):
|
||||
# minecraft
|
||||
shutil.copy("minecraft/server.default", "minecraft/server.properties")
|
||||
with open("minecraft/server.properties", "a") as f:
|
||||
f.write(f"level-name=data/{cfg["minecraft"]["world"]}")
|
||||
f.write(f"level-name=data/{cfg["minecraft"]["world"]}\n")
|
||||
|
||||
# minecraft_bedrock
|
||||
shutil.copy("minecraft_bedrock/server.default", "minecraft_bedrock/server.properties")
|
||||
with open("minecraft_bedrock/server.properties", "a") as f:
|
||||
f.write(f"level-name={cfg["minecraft_bedrock"]["world"]}\n")
|
||||
|
||||
# terraria
|
||||
shutil.copy("terraria/config.default", "terraria/config.txt")
|
||||
with open("terraria/config.txt", "a") as f:
|
||||
f.write(f"world=/root/data/worlds/{cfg["terraria"]["world"]}.wld\n")
|
||||
f.write(f"autocreate={cfg["terraria"]["autogen"]["size"]}\n") # 1=small, 2=medium, 3=large
|
||||
f.write(f"difficulty={cfg["terraria"]["autogen"]["difficulty"]}\n") # 0=normal, 1=expert, 2=master, 3=journey
|
||||
with open("terraria/password.txt", "w") as f:
|
||||
f.write(cfg["terraria"]["password"])
|
||||
|
||||
def run(cmds):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user