更新日志
批量导入
版本内容
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v2",
"update_url": "https://eggs.pterodactyl.top/eggs/245/download/egg-rimworld-together.json"
},
"exported_at": "2025-05-03T06:57:38-04:00",
"name": "Rimworld Together",
"author": "josdekurk@gmail.com",
"description": "A community driven multiplayer mod, for Rimworld.",
"features": null,
"docker_images": {
"registry.cn-shanghai.aliyuncs.com/pterodactyl-images/yolks:dotnet_7": "registry.cn-shanghai.aliyuncs.com/pterodactyl-images/yolks:dotnet_7"
},
"file_denylist": [],
"startup": "./GameServer",
"config": {
"files": "{\r\n \"Configs/ServerConfig.json\": {\r\n \"parser\": \"json\",\r\n \"find\": {\r\n \"IP\": \"0.0.0.0\",\r\n \"Port\": \"{{server.build.default.port}}\",\r\n \"MaxPlayers\": \"{{server.build.env.MAX_PLAYERS}}\",\r\n \"verboseLogs\": \"{{server.build.env.VERBOSE}}\"\r\n }\r\n }\r\n}",
"startup": "{\r\n \"done\": \"Server launched\"\r\n}",
"logs": "{}",
"stop": "quit"
},
"scripts": {
"installation": {
"script": "#!/usr/bin/env bash\r\nset -euo pipefail\r\n\r\n# 1. Set repository variables\r\nOWNER=\"RimWorldTogether\"\r\nREPO=\"Rimworld-Together\"\r\n\r\n# 2. Detect architecture\r\nARCH=$(uname -m)\r\ncase \"$ARCH\" in\r\n x86_64) MATCH=\"linux-x64\" ;;\r\n aarch64) MATCH=\"linux-arm64\" ;;\r\n arm) MATCH=\"linux-arm\" ;;\r\n *) echo \"Architecture '$ARCH' not supported\"; exit 1 ;;\r\nesac\r\n\r\n# 3. Collect API data\r\nif [[ -z \"${VERSION:-}\" ]] || [[ \"${VERSION}\" == \"latest\" ]]; then\r\n # Latest release\r\n JSON=$(curl -sSL \"https://api.github.com/repos/$OWNER/$REPO/releases/latest\")\r\nelse\r\n # All releases (to check if the tag exists)\r\n ALL=$(curl -sSL \"https://api.github.com/repos/$OWNER/$REPO/releases\")\r\n # Checks the existence of the tag\r\n TAG_EXISTS=$(echo \"$ALL\" | jq -r --arg V \"$VERSION\" '.[] | select(.tag_name==$V) | .tag_name')\r\n if [[ -z \"$TAG_EXISTS\" ]]; then\r\n echo \"Tag '$VERSION' not found; using latest\"\r\n JSON=$(curl -sSL \"https://api.github.com/repos/$OWNER/$REPO/releases/latest\")\r\n else\r\n JSON=$(echo \"$ALL\" | jq -r --arg V \"$VERSION\" '.[] | select(.tag_name==$V)')\r\n fi\r\nfi\r\n\r\n# 4. Extract correct asset download URL\r\nDOWNLOAD_URL=$(echo \"$JSON\" \\\r\n | jq -r '.assets[].browser_download_url' \\\r\n | grep -i \"$MATCH\")\r\n\r\nif [[ -z \"$DOWNLOAD_URL\" ]]; then\r\n echo \"No assets found for architecture '$MATCH'\"\r\n exit 1\r\nfi\r\n\r\n# 5. Prepare directory and download\r\nmkdir -p /mnt/server\r\ncd /mnt/server\r\n\r\necho \"Downloading: $DOWNLOAD_URL\"\r\ncurl -sSL -o server.zip \"$DOWNLOAD_URL\"\r\nunzip -o server.zip\r\nrm server.zip\r\n\r\n# 6. Adjust permissions\r\nchmod +x GameServer\r\n\r\n# 7. Generate configuration if needed\r\nCONFIG=\"/mnt/server/Configs/ServerConfig.json\"\r\nif [[ -f \"$CONFIG\" ]]; then\r\n echo \"Config file exists\"\r\nelse\r\n mkdir -p /mnt/server/Configs\r\n\r\n # Use jq -n to create JSON from environment variables\r\n jq -n \\\r\n --argjson port \"${SERVER_PORT:-0}\" \\\r\n --argjson maxPlayers \"${MAX_PLAYERS:-0}\" \\\r\n --argjson verboseLogs \"${VERBOSE:-false}\" \\\r\n '{\r\n Port: $port,\r\n MaxPlayers: $maxPlayers,\r\n verboseLogs: $verboseLogs\r\n }' > \"$CONFIG\"\r\n\r\n echo \"Config file created in $CONFIG\"\r\nfi\r\n\r\n\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\"",
"container": "registry.cn-shanghai.aliyuncs.com/pterodactyl-images/installers:debian",
"entrypoint": "bash"
}
},
"variables": [
{
"name": "Version",
"description": "",
"env_variable": "VERSION",
"default_value": "latest",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:20",
"field_type": "text"
},
{
"name": "Max Players",
"description": "The maximum amount of players that can join. Default: 100",
"env_variable": "MAX_PLAYERS",
"default_value": "100",
"user_viewable": true,
"user_editable": true,
"rules": "required|numeric|between:1,150",
"field_type": "text"
},
{
"name": "Verbose",
"description": "If the console output should be verbose or not.",
"env_variable": "VERBOSE",
"default_value": "false",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|in:false,true",
"field_type": "text"
}
]
}