mirror of
https://github.com/pelican-eggs/minecraft.git
synced 2024-11-22 19:02:40 +01:00
update purpur install script (#1444)
This commit is contained in:
parent
b0ce35d8bc
commit
b7747651f6
@ -4,7 +4,7 @@
|
||||
"version": "PTDL_v1",
|
||||
"update_url": null
|
||||
},
|
||||
"exported_at": "2021-07-17T01:51:57+03:00",
|
||||
"exported_at": "2021-12-07T02:27:26+00:00",
|
||||
"name": "Purpur",
|
||||
"author": "purpur@birdflop.com",
|
||||
"description": "Fork of Paper and Tuinity providing new configuration options.",
|
||||
@ -28,9 +28,9 @@
|
||||
},
|
||||
"scripts": {
|
||||
"installation": {
|
||||
"script": "#!\/bin\/bash\r\n# Purpur Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n\r\napt update\r\napt install -y curl jq\r\n\r\nVER_EXISTS=`curl -s https:\/\/api.pl3x.net\/v2\/purpur\/ | jq -r --arg VERSION $MINECRAFT_VERSION '.versions[] | contains($VERSION)?' | grep true`\r\nLATEST_PURPUR_VERSION=`curl -s https:\/\/api.pl3x.net\/v2\/purpur\/ | jq -r '.versions' | jq -r '.[0]?'`\r\n\r\nif [ \"${VER_EXISTS}\" == \"true\" ]; then\r\n echo -e \"Chosen version is valid. Using version ${MINECRAFT_VERSION}\"\r\nelse\r\n echo -e \"Chosen version is invalid. Defaulting to the latest Purpur version\"\r\n MINECRAFT_VERSION=${LATEST_PURPUR_VERSION}\r\nfi\r\n\r\nBUILD_EXISTS=`curl -s https:\/\/api.pl3x.net\/v2\/purpur\/${MINECRAFT_VERSION}\/ | jq -r --arg BUILD $BUILD_NUMBER '.builds.all[] | contains($BUILD)?' | grep true`\r\nLATEST_PURPUR_BUILD=`curl -s https:\/\/api.pl3x.net\/v2\/purpur\/${MINECRAFT_VERSION}\/ | jq -r '.builds.latest'`\r\n\r\nif [ \"${BUILD_EXISTS}\" == \"true\" ] || [ ${BUILD_NUMBER} == \"latest\" ]; then\r\n echo -e \"Chosen build is valid. Using version ${BUILD_NUMBER}\"\r\nelse\r\n echo -e \"Chosen version is invalid. Using the latest Purpur build\"\r\n BUILD_NUMBER=${LATEST_PURPUR_BUILD}\r\nfi\r\n\r\necho \"Version being downloaded\"\r\necho -e \"MC Version: ${MINECRAFT_VERSION}\"\r\necho -e \"Build: ${BUILD_NUMBER}\"\r\nDOWNLOAD_URL=https:\/\/api.pl3x.net\/v2\/purpur\/${MINECRAFT_VERSION}\/${BUILD_NUMBER}\/download \r\n\r\ncd \/mnt\/server\r\n\r\necho -e \"running curl -o ${SERVER_JARFILE} ${DOWNLOAD_URL}\"\r\n\r\nif [ -f ${SERVER_JARFILE} ]; then\r\n mv ${SERVER_JARFILE} ${SERVER_JARFILE}.old\r\nfi\r\n\r\ncurl -o ${SERVER_JARFILE} ${DOWNLOAD_URL}\r\n\r\nif [ ! -f server.properties ]; then\r\n echo -e \"Downloading MC server.properties\"\r\n curl -sSL -o server.properties https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/game_eggs\/minecraft\/java\/server.properties\r\nfi",
|
||||
"container": "debian:buster-slim",
|
||||
"entrypoint": "bash"
|
||||
"script": "#!\/bin\/ash\r\n# Paper Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\nPROJECT=purpur\r\n\r\nif [ -n \"${DL_PATH}\" ]; then\r\n\techo -e \"Using supplied download url: ${DL_PATH}\"\r\n\tDOWNLOAD_URL=`eval echo $(echo ${DL_PATH} | sed -e 's\/{{\/${\/g' -e 's\/}}\/}\/g')`\r\nelse\r\n\tVER_EXISTS=`curl -s https:\/\/api.purpurmc.org\/v2\/${PROJECT} | jq -r --arg VERSION $MINECRAFT_VERSION '.versions[] | contains($VERSION)' | grep true`\r\n\tLATEST_VERSION=`curl -s https:\/\/api.purpurmc.org\/v2\/${PROJECT} | jq -r '.versions' | jq -r '.[-1]'`\r\n\r\n\tif [ \"${VER_EXISTS}\" == \"true\" ]; then\r\n\t\techo -e \"Version is valid. Using version ${MINECRAFT_VERSION}\"\r\n\telse\r\n\t\techo -e \"Using the latest ${PROJECT} version\"\r\n\t\tMINECRAFT_VERSION=${LATEST_VERSION}\r\n\tfi\r\n\t\r\n\tBUILD_EXISTS=`curl -s https:\/\/api.purpurmc.org\/v2\/${PROJECT}\/${MINECRAFT_VERSION} | jq -r --arg BUILD ${BUILD_NUMBER} '.builds.all | tostring | contains($BUILD)' | grep true`\r\n\tLATEST_BUILD=`curl -s https:\/\/api.purpurmc.org\/v2\/${PROJECT}\/${MINECRAFT_VERSION} | jq -r '.builds.latest'`\r\n\t\r\n\tif [ \"${BUILD_EXISTS}\" == \"true\" ]; then\r\n\t\techo -e \"Build is valid for version ${MINECRAFT_VERSION}. Using build ${BUILD_NUMBER}\"\r\n\telse\r\n\t\techo -e \"Using the latest ${PROJECT} build for version ${MINECRAFT_VERSION}\"\r\n\t\tBUILD_NUMBER=${LATEST_BUILD}\r\n\tfi\r\n\t\r\n\tJAR_NAME=${PROJECT}-${MINECRAFT_VERSION}-${BUILD_NUMBER}.jar\r\n\t\r\n\techo \"Version being downloaded\"\r\n\techo -e \"MC Version: ${MINECRAFT_VERSION}\"\r\n\techo -e \"Build: ${BUILD_NUMBER}\"\r\n\techo -e \"JAR Name of Build: ${JAR_NAME}\"\r\n\tDOWNLOAD_URL=https:\/\/api.purpurmc.org\/v2\/${PROJECT}\/${MINECRAFT_VERSION}\/${BUILD_NUMBER}\/download\r\nfi\r\n\r\ncd \/mnt\/server\r\n\r\necho -e \"Running curl -o ${SERVER_JARFILE} ${DOWNLOAD_URL}\"\r\n\r\nif [ -f ${SERVER_JARFILE} ]; then\r\n\tmv ${SERVER_JARFILE} ${SERVER_JARFILE}.old\r\nfi\r\n\r\ncurl -o ${SERVER_JARFILE} ${DOWNLOAD_URL}\r\n\r\nif [ ! -f server.properties ]; then\r\n echo -e \"Downloading MC server.properties\"\r\n curl -o server.properties https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/minecraft\/java\/server.properties\r\nfi",
|
||||
"container": "ghcr.io\/pterodactyl\/installers:alpine",
|
||||
"entrypoint": "ash"
|
||||
}
|
||||
},
|
||||
"variables": [
|
||||
@ -62,4 +62,4 @@
|
||||
"rules": "required|string|max:20"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user