diff options
| author | Alex Pooley (@zuedev) <zuedev@gmail.com> | 2026-04-25 22:43:42 +0100 |
|---|---|---|
| committer | Alex Pooley (@zuedev) <zuedev@gmail.com> | 2026-04-25 22:43:42 +0100 |
| commit | 8fc4ec939706d9b67dbeca236b7d1ce2e9dac652 (patch) | |
| tree | 5ae782b901acda07437ffd8a40d4a7a48acbd339 | |
| parent | c2b532205748ff7f0dcfc9e030f254066dd8111c (diff) | |
| download | NuclearOptionDedicatedServerDocker-8fc4ec939706d9b67dbeca236b7d1ce2e9dac652.tar NuclearOptionDedicatedServerDocker-8fc4ec939706d9b67dbeca236b7d1ce2e9dac652.tar.gz NuclearOptionDedicatedServerDocker-8fc4ec939706d9b67dbeca236b7d1ce2e9dac652.tar.bz2 NuclearOptionDedicatedServerDocker-8fc4ec939706d9b67dbeca236b7d1ce2e9dac652.tar.xz NuclearOptionDedicatedServerDocker-8fc4ec939706d9b67dbeca236b7d1ce2e9dac652.zip | |
add workshop download support
Co-authored-by: Copilot <copilot@github.com>
| -rw-r--r-- | entrypoint.mjs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/entrypoint.mjs b/entrypoint.mjs index 10c90d7..968c760 100644 --- a/entrypoint.mjs +++ b/entrypoint.mjs @@ -77,5 +77,26 @@ for (const { name, type } of CONFIG_FIELDS) { writeFileSync(CONFIG_PATH, JSON.stringify(config, null, 2) + "\n"); +// Do we have any workshop items to download? +if (process.env.WORKSHOP_ITEMS) { + const itemIds = process.env.WORKSHOP_ITEMS.split(",").map((id) => id.trim()); + console.log(`Downloading workshop items: ${itemIds.join(", ")}`); + for (const itemId of itemIds) { + execFileSync( + "steamcmd", + [ + "+login", + STEAM_USERNAME, + STEAM_PASSWORD || "", + "+workshop_download_item", + "3930080", + itemId, + "+quit", + ], + { stdio: "inherit" }, + ); + } +} + // Run the server execFileSync("sh", ["/app/RunServer.sh"], { stdio: "inherit" }); |
