From 638a2c92cecf973277fe7f9c34d6b7ef739a445e Mon Sep 17 00:00:00 2001 From: Joshua Taylor Date: Fri, 5 Jan 2024 08:23:43 -0600 Subject: [PATCH] Attempt fixes for failing templates --- spec.json | 3 ++ squad/squad.json | 1 + teamspeak3/data.json | 11 +++++++ teamspeak3/teamspeak3.json | 6 ++-- terraria-tmodloader/terraria-tmodloader.json | 26 ++++------------- terraria-tshock/terraria-tshock.json | 30 +++++++++++++++++--- terraria-vanilla/terraria-vanilla.json | 2 +- valheim/valheim.json | 19 +++++++++---- 8 files changed, 65 insertions(+), 33 deletions(-) create mode 100644 teamspeak3/data.json diff --git a/spec.json b/spec.json index 023e06e4..3f297e34 100644 --- a/spec.json +++ b/spec.json @@ -135,6 +135,9 @@ }, "autorestart": { "type": "boolean" + }, + "expectedExitCode": { + "type": "integer" } }, "required": [ diff --git a/squad/squad.json b/squad/squad.json index a9972bc0..6b62b58e 100644 --- a/squad/squad.json +++ b/squad/squad.json @@ -72,6 +72,7 @@ "run": { "command": "SquadGame/Binaries/Linux/SquadGameServer Port=${port} QueryPort=${query_port} FIXEDMAXPLAYERS=${fixed_max_players} RANDOM=${random}", "stopCode": 15, + "expectedExitCode": 143, "pre": [ { "if": "env == 'host'", diff --git a/teamspeak3/data.json b/teamspeak3/data.json new file mode 100644 index 00000000..167f7491 --- /dev/null +++ b/teamspeak3/data.json @@ -0,0 +1,11 @@ +[ + { + "name": "teamspeak", + "variables": { + "eula": "1" + }, + "environment": { + "type": "host" + } + } +] \ No newline at end of file diff --git a/teamspeak3/teamspeak3.json b/teamspeak3/teamspeak3.json index 57c65e6f..672a19fc 100644 --- a/teamspeak3/teamspeak3.json +++ b/teamspeak3/teamspeak3.json @@ -72,7 +72,9 @@ "install": [ { "type": "download", - "files": "https://files.teamspeak-services.com/releases/server/${version}/teamspeak3-server_linux_amd64-${version}.tar.bz2" + "files": [ + "https://files.teamspeak-services.com/releases/server/${version}/teamspeak3-server_linux_amd64-${version}.tar.bz2" + ] }, { "type": "command", @@ -102,4 +104,4 @@ "tar" ] } -} +} \ No newline at end of file diff --git a/terraria-tmodloader/terraria-tmodloader.json b/terraria-tmodloader/terraria-tmodloader.json index a6adf1f1..f7f51a4e 100644 --- a/terraria-tmodloader/terraria-tmodloader.json +++ b/terraria-tmodloader/terraria-tmodloader.json @@ -226,7 +226,7 @@ }, "tversion": { "type": "string", - "value": "", + "value": "v2023.11.3.3", "display": "tModLoader Version (Set this to the latest tModLoader version to enable support - see https://github.com/tModLoader/tModLoader/releases/latest)", "desc": "tModLoader Version", "required": false, @@ -253,35 +253,21 @@ { "type": "download", "files": [ - "https://github.com/tModLoader/tModLoader/releases/download/v${tversion}/tModLoader.Linux.v${tversion}.tar.gz" + "https://github.com/tModLoader/tModLoader/releases/download/v${tversion}/tModLoader.zip" ] }, { "type": "command", "commands": [ - "mv ./${mp}/enabled.json ./", - "rm -r ./server", + "rm -rf ./server", "mkdir ./server", - "tar -xf tModLoader.Linux.v${tversion}.tar.gz --directory ./server", + "unzip tModLoader.zip -d ./server", "chmod +x ./server/tModLoaderServer", "chmod +x ./server/tModLoaderServer.bin.x86", "chmod +x ./server/tModLoaderServer.bin.x86_64", - "mkdir ./${wp}", - "mkdir ./${mp}", + "mkdir -p ./${wp}", "rm tModLoader.Linux.v${tversion}.tar.gz" ] - }, - { - "type": "writefile", - "target": "enabled.jsonn", - "text": "[\n \"Mod1\",\n \"Mod2\",\n \"Mod3\"\n]" - }, - { - "type": "command", - "commands": [ - "mv ./enabled.jsonn ./${mp}/enabled.json", - "mv ./enabled.json ./${mp}/enabled.json" - ] } ], "run": { @@ -311,4 +297,4 @@ "tar" ] } -} +} \ No newline at end of file diff --git a/terraria-tshock/terraria-tshock.json b/terraria-tshock/terraria-tshock.json index e2929a93..83cf80b3 100644 --- a/terraria-tshock/terraria-tshock.json +++ b/terraria-tshock/terraria-tshock.json @@ -89,6 +89,28 @@ "desc": "Name of the worlds folder", "required": true, "userEdit": false + }, + "wsize": { + "type": "option", + "value": "3", + "display": "World Size", + "desc": "World Size to create", + "required": true, + "userEdit": false, + "options": [ + { + "value": "1", + "display": "Small" + }, + { + "value": "2", + "display": "Medium" + }, + { + "value": "3", + "display": "Large" + } + ] } }, "install": [ @@ -114,10 +136,10 @@ } ], "run": { - "command": "./TShock.Server -ip ${ip} -port ${port} -worldselectpath ${wpath} ${secure}", + "command": "./TShock.Server -ip ${ip} -port ${port} -worldselectpath ${wpath} ${secure} -autocreate ${wsize}", "stop": "exit", "environmentVars": { - "DOTNET_ROOT": "${rootDir}/dotnet" + "DOTNET_ROOT": "./dotnet" }, "stdin": { "type": "stdin" @@ -127,7 +149,7 @@ "autorestart": false }, "environment": { - "type": "tty" + "type": "host" }, "requirements": { "os": "linux", @@ -135,4 +157,4 @@ "unzip" ] } -} +} \ No newline at end of file diff --git a/terraria-vanilla/terraria-vanilla.json b/terraria-vanilla/terraria-vanilla.json index d1d25f46..a3e5ca77 100644 --- a/terraria-vanilla/terraria-vanilla.json +++ b/terraria-vanilla/terraria-vanilla.json @@ -259,7 +259,7 @@ { "type": "command", "commands": [ - "rm -r ./server", + "rm -rf ./server", "unzip terraria-server-${version}.zip", "mkdir ./server", "cp -r ./${version}/Linux/. ./server", diff --git a/valheim/valheim.json b/valheim/valheim.json index 9e01590e..df39e0b3 100644 --- a/valheim/valheim.json +++ b/valheim/valheim.json @@ -4,7 +4,8 @@ "data": { "modpack": { "type": "string", - "value": "Modpack to run with", + "value": "", + "display": "Modpack to run with", "desc": "Open https://valheim.thunderstore.io/package/denikson/BepInExPack_Valheim/ in new tab and right 'manual download' click > copy link. Paste it here if you wish to use this modpack.", "required": false, "userEdit": true @@ -56,9 +57,10 @@ ] }, { - "type": "command", - "commands": [ - "chmod +x valheim_server.x86_64" + "if": "modpack != ''", + "type": "download", + "files": [ + "${modpack}" ] }, { @@ -67,7 +69,12 @@ "commands": [ "unzip ./denikson-BepInExPack_Valheim*.zip -d ./bepin_temp/", "cp -r ./bepin_temp/BepInExPack_Valheim/. ./", - "rm -r ./bepin_temp", + "rm -r ./bepin_temp" + ] + }, + { + "type": "command", + "commands": [ "chmod +x valheim_server.x86_64" ] } @@ -92,4 +99,4 @@ "os": "linux", "arch": "amd64" } -} +} \ No newline at end of file