mirror of
https://github.com/parkervcp/eggs.git
synced 2024-11-30 03:02:55 +08:00
Add files via upload
This commit is contained in:
parent
fda5868d75
commit
2c502d0e3b
@ -4,7 +4,7 @@
|
|||||||
"version": "PTDL_v1",
|
"version": "PTDL_v1",
|
||||||
"update_url": null
|
"update_url": null
|
||||||
},
|
},
|
||||||
"exported_at": "2021-12-23T08:49:44-05:00",
|
"exported_at": "2021-12-23T10:20:23-05:00",
|
||||||
"name": "Glowstone",
|
"name": "Glowstone",
|
||||||
"author": "support@pterodactyl.io",
|
"author": "support@pterodactyl.io",
|
||||||
"description": "Glowstone is an open-source server implementation for Minecraft: Java Edition 1.12.2 and up.",
|
"description": "Glowstone is an open-source server implementation for Minecraft: Java Edition 1.12.2 and up.",
|
||||||
@ -25,7 +25,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"installation": {
|
"installation": {
|
||||||
"script": "#!\/bin\/bash\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y jq curl wget grep\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nif [ $MAVEN_VERSION == \"latest\" ]\r\nthen\r\n echo -e \"Downloading latest release from GitHub...\"\r\n\r\n curl -s https:\/\/api.github.com\/repos\/GlowstoneMC\/Glowstone\/releases\/latest \\\r\n | grep \"browser_download_url.*jar\" \\\r\n | cut -d : -f 2,3 \\\r\n | tr -d \\\" \\\r\n | wget -O ${SERVER_JARFILE} -qi -\r\nelse \r\n echo -e \"Downloading release ${MAVEN_VERSION} from Maven Repository...\"\r\n \r\n wget -O ${SERVER_JARFILE} \"https:\/\/repo.glowstone.net\/service\/rest\/v1\/search\/assets\/download?group=net.glowstone&name=glowstone&sort=version&repository=snapshots&maven.baseVersion=${MAVEN_VERSION}&direction=desc&maven.classifier=\"\r\nfi\r\n\r\necho -e \"Generating configuration...\"\r\njava -jar ${SERVER_JARFILE} --generate-config\r\n\r\necho -e \"Install Complete\"",
|
"script": "#!\/bin\/bash\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y jq curl\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nif [ $VERSION == *SNAPSHOT ]; then\r\n echo -e \"Using Maven\"\r\n \r\n DOWNLOAD_URL=\"https:\/\/repo.glowstone.net\/service\/rest\/v1\/search\/assets\/download?group=net.glowstone&name=glowstone&sort=version&repository=snapshots&maven.baseVersion=${VERSION}&direction=desc&maven.classifier=\"\r\nelse \r\n echo -e \"Using GitHub.\"\r\n\r\n if [ -z \"${GITHUB_USER}\" ] && [ -z \"${GITHUB_OAUTH_TOKEN}\" ] ; then\r\n echo -e \"using anon api call\"\r\n else\r\n echo -e \"user and oauth token set\"\r\n alias curl='curl -u ${GITHUB_USER}:${GITHUB_OAUTH_TOKEN} '\r\n fi\r\n \r\n ## get release info and download links\r\n LATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\/latest\")\r\n RELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\")\r\n\r\n if [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\n else\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 ${MATCH})\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)\r\n fi\r\n fi\r\nfi\r\n\r\necho -e \"Downloading...\"\r\ncurl --silent -L -o ${SERVER_JARFILE} ${DOWNLOAD_URL}\r\n\r\necho -e \"Generating configuration...\"\r\njava -jar ${SERVER_JARFILE} --generate-config\r\n\r\necho -e \"Install Complete\"",
|
||||||
"container": "eclipse-temurin:8-jdk",
|
"container": "eclipse-temurin:8-jdk",
|
||||||
"entrypoint": "bash"
|
"entrypoint": "bash"
|
||||||
}
|
}
|
||||||
@ -35,19 +35,55 @@
|
|||||||
"name": "Server Jar File",
|
"name": "Server Jar File",
|
||||||
"description": "The name of the server jarfile to run the server with.",
|
"description": "The name of the server jarfile to run the server with.",
|
||||||
"env_variable": "SERVER_JARFILE",
|
"env_variable": "SERVER_JARFILE",
|
||||||
"default_value": "server.jar",
|
"default_value": "glowstone.jar",
|
||||||
"user_viewable": true,
|
"user_viewable": true,
|
||||||
"user_editable": true,
|
"user_editable": true,
|
||||||
"rules": "required|regex:\/^([\\w\\d._-]+)(\\.jar)$\/"
|
"rules": "required|regex:\/^([\\w\\d._-]+)(\\.jar)$\/"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Maven Version",
|
"name": "Glowstone Version",
|
||||||
"description": "The version to download from the Maven Repository, or latest (downloads from GitHub)",
|
"description": "The version of Glowstone to download. If it ends in SNAPSHOT, it will attempt to download from the maven repository.",
|
||||||
"env_variable": "MAVEN_VERSION",
|
"env_variable": "VERSION",
|
||||||
"default_value": "latest",
|
"default_value": "latest",
|
||||||
"user_viewable": true,
|
"user_viewable": true,
|
||||||
"user_editable": true,
|
"user_editable": true,
|
||||||
"rules": "required|string|max:20"
|
"rules": "required|string|max:20"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GitHub User",
|
||||||
|
"description": "GitHub user to use for api calls.\r\n\r\nThis only needs to be set if you hit the GitHub API too often across multiple servers.",
|
||||||
|
"env_variable": "GITHUB_USER",
|
||||||
|
"default_value": "",
|
||||||
|
"user_viewable": false,
|
||||||
|
"user_editable": false,
|
||||||
|
"rules": "string|nullable"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GitHub OAuth Token",
|
||||||
|
"description": "This can be either an OAuth or a Personal Access Token.\r\n\r\nThis is required for the install is you set a user.",
|
||||||
|
"env_variable": "GITHUB_OAUTH_TOKEN",
|
||||||
|
"default_value": "",
|
||||||
|
"user_viewable": false,
|
||||||
|
"user_editable": false,
|
||||||
|
"rules": "string|nullable"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GitHub Package",
|
||||||
|
"description": "The repository to download from.",
|
||||||
|
"env_variable": "GITHUB_PACKAGE",
|
||||||
|
"default_value": "GlowstoneMC\/Glowstone",
|
||||||
|
"user_viewable": true,
|
||||||
|
"user_editable": false,
|
||||||
|
"rules": "required|string|max:20"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Match",
|
||||||
|
"description": "",
|
||||||
|
"env_variable": "MATCH",
|
||||||
|
"default_value": "glowstone.jar",
|
||||||
|
"user_viewable": false,
|
||||||
|
"user_editable": false,
|
||||||
|
"rules": "required|string"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user