This commit is contained in:
diedyesterday 2023-05-27 13:04:59 +03:00
parent e161823bef
commit 66f418cfb6

View File

@ -4,10 +4,10 @@
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2023-05-01T11:19:44+02:00",
"exported_at": "2023-05-27T13:03:41+03:00",
"name": "Rimworld: Open World",
"author": "kyle@williquette.us",
"description": "The Open World mod allows you to create and join servers to play with people all around the world, it introduces plenty of new features including trading, gifting, bartering, PvP and so much more!\r\n\r\nhttps:\/\/github.com\/mypassowordisntweak\/OpenWorld",
"description": "The Open World mod allows you to create and join servers to play with people all around the world, it introduces plenty of new features including trading, gifting, bartering, PvP and so much more!\r\n\r\nhttps:\/\/github.com\/D12-Dev\/OpenWorld",
"features": null,
"docker_images": {
"Dotnet 3.1": "ghcr.io\/parkervcp\/yolks:dotnet_3.1",
@ -23,7 +23,7 @@
},
"scripts": {
"installation": {
"script": "#!\/bin\/bash\r\n\r\n#Create the server directory\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\napt update\r\napt -y install curl jq unzip git\r\n\r\n\r\n#Check for latest release & download URLs\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/mypassowordisntweak\/OpenWorld\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/mypassowordisntweak\/OpenWorld\/releases\")\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"linux-x64\" || echo \"linux-arm64\")\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${ARCH} | head -1)\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${ARCH} | head -1)\r\n else\r\n echo -e \"defaulting to latest release\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${ARCH}| head -1)\r\n fi\r\nfi\r\n\r\n\r\n#Download the Rimworld Open World server\r\necho -e \"Running curl -sSL ${DOWNLOAD_URL} -o ${ARCH}.zip\"\r\ncurl -sSL ${DOWNLOAD_URL} -o ${ARCH}.zip\r\necho -e \"Unzipping ${ARCH}.zip\"\r\nunzip -o ${ARCH}.zip\r\nmv ${ARCH}\/* \/mnt\/server\r\nchmod +x \"OpenWorldServer\"\r\nrm -rf ${ARCH}.zip ${ARCH}\/\r\n\r\n\r\n\r\ncd \/mnt\/server\r\nFILE=\/mnt\/server\/Data\/Config.json\r\nif [ -f \"$FILE\" ]; then\r\n echo \"config already exists.\"\r\nelse \r\n echo \"Config does not exist, making one\"\r\n mkdir -p \/mnt\/server\/Data\r\n cd \/mnt\/server\/Data\r\ncat << EOF > \"Config.json\"\r\n{\r\n \"LocalAddress\": \"0.0.0.0\",\r\n \"ServerPort\": 25555,\r\n \"MaxPlayers\": 10,\r\n \"PlayerVersion\": \"1.2\",\r\n \"EnforceMods\": false,\r\n \"UseModBlacklist\": false,\r\n \"UseCustomDifficulty\": false,\r\n \"UseWhitelist\": false,\r\n \"AllowCustomScenarios\": false\r\n}\r\nEOF\r\nfi\r\n\r\n\r\n## install end\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\"",
"script": "#!\/bin\/bash\r\n\r\n#Create the server directory\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\napt update\r\napt -y install curl jq unzip git\r\n\r\n\r\n#Check for latest release & download URLs\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/D12-Dev\/OpenWorld\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/D12-Dev\/OpenWorld\/releases\")\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"linux-x64\" || echo \"linux-arm64\")\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${ARCH} | head -1)\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${ARCH} | head -1)\r\n else\r\n echo -e \"defaulting to latest release\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${ARCH}| head -1)\r\n fi\r\nfi\r\n\r\n\r\n#Download the Rimworld Open World server\r\necho -e \"Running curl -sSL ${DOWNLOAD_URL} -o ${ARCH}.zip\"\r\ncurl -sSL ${DOWNLOAD_URL} -o ${ARCH}.zip\r\necho -e \"Unzipping ${ARCH}.zip\"\r\nunzip -o ${ARCH}.zip\r\nmv ${ARCH}\/* \/mnt\/server\r\nchmod +x \"OpenWorldServer\"\r\nrm -rf ${ARCH}.zip ${ARCH}\/\r\n\r\n\r\n\r\ncd \/mnt\/server\r\nFILE=\/mnt\/server\/Data\/Config.json\r\nif [ -f \"$FILE\" ]; then\r\n echo \"config already exists.\"\r\nelse \r\n echo \"Config does not exist, making one\"\r\n mkdir -p \/mnt\/server\/Data\r\n cd \/mnt\/server\/Data\r\ncat << EOF > \"Config.json\"\r\n{\r\n \"LocalAddress\": \"0.0.0.0\",\r\n \"ServerPort\": 25555,\r\n \"MaxPlayers\": 10,\r\n \"PlayerVersion\": \"1.2\",\r\n \"EnforceMods\": false,\r\n \"UseModBlacklist\": false,\r\n \"UseCustomDifficulty\": false,\r\n \"UseWhitelist\": false,\r\n \"AllowCustomScenarios\": false\r\n}\r\nEOF\r\nfi\r\n\r\n\r\n## install end\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\"",
"container": "debian:bullseye-slim",
"entrypoint": "bash"
}