1
0
mirror of https://github.com/parkervcp/eggs.git synced 2024-10-06 23:57:07 +02:00

Fix mohist download url & make jar file viewable (#1530)

This commit is contained in:
Boy132 2022-01-14 12:01:38 +01:00 committed by GitHub
parent e95d3e6f7e
commit 45da38ccaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,7 @@
"version": "PTDL_v1", "version": "PTDL_v1",
"update_url": null "update_url": null
}, },
"exported_at": "2021-06-14T21:28:24+03:00", "exported_at": "2022-01-14T09:54:36+01:00",
"name": "Mohist", "name": "Mohist",
"author": "alex.chang-lam@protonmail.com", "author": "alex.chang-lam@protonmail.com",
"description": "Spigot fork with performance optimizations.", "description": "Spigot fork with performance optimizations.",
@ -28,7 +28,7 @@
}, },
"scripts": { "scripts": {
"installation": { "installation": {
"script": "#!\/bin\/bash\r\n# Mohist Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y curl\r\n\r\n#Go into main direction\r\nif [ ! -d \/mnt\/server ]; then\r\n mkdir \/mnt\/server\r\nfi\r\n\r\ncd \/mnt\/server\r\n\r\nif [ ! -z ${BUILD_VERSION} ]; then\r\n DOWNLOAD_LINK=https:\/\/mohistmc.com\/api\/${MC_VERSION}\/${BUILD_VERSION}\/download\r\nelse\r\n DOWNLOAD_LINK=https:\/\/mohistmc.com\/api\/${MC_VERSION}\/${BUILD_TYPE}\/download\r\nfi\r\n\r\n#Downloading jars\r\necho -e \"Download link is ${DOWNLOAD_LINK}\"\r\necho -e \"Downloading build version ${BUILD_VERSION}\"\r\nif [ ! -z \"${DOWNLOAD_LINK}\" ]; then \r\n if curl --output \/dev\/null --silent --head --fail ${DOWNLOAD_LINK}-server.jar; then\r\n echo -e \"Download link is valid.\"\r\n else\r\n echo -e \"Link is invalid closing out\"\r\n exit 2\r\n fi\r\nfi\r\n\r\ncurl -s -o server.jar -sS ${DOWNLOAD_LINK}\r\n\r\n#Checking if downloaded jars exist\r\nif [ ! -f .\/server.jar ]; then\r\n echo \"!!! Error downloading build version ${BUILD_VERSION} !!!\"\r\n exit\r\nfi", "script": "#!\/bin\/bash\r\n# Mohist Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y curl\r\n\r\n#Go into main direction\r\nif [ ! -d \/mnt\/server ]; then\r\n mkdir \/mnt\/server\r\nfi\r\n\r\ncd \/mnt\/server\r\n\r\nif [ ! -z ${BUILD_VERSION} ]; then\r\n DOWNLOAD_LINK=https:\/\/mohistmc.com\/api\/${MC_VERSION}\/${BUILD_VERSION}\/download\r\nelse\r\n DOWNLOAD_LINK=https:\/\/mohistmc.com\/api\/${MC_VERSION}\/${BUILD_TYPE}\/download\r\nfi\r\n\r\n#Downloading jars\r\necho -e \"Download link is ${DOWNLOAD_LINK}\"\r\necho -e \"Downloading build version ${BUILD_VERSION}\"\r\nif [ ! -z \"${DOWNLOAD_LINK}\" ]; then \r\n if curl --output \/dev\/null --silent --fail ${DOWNLOAD_LINK}; then\r\n echo -e \"Download link is valid.\"\r\n else\r\n echo -e \"Link is invalid closing out\"\r\n exit 2\r\n fi\r\nfi\r\n\r\ncurl -s -o server.jar -sS ${DOWNLOAD_LINK}\r\n\r\n#Checking if downloaded jars exist\r\nif [ ! -f .\/server.jar ]; then\r\n echo \"!!! Error downloading build version ${BUILD_VERSION} !!!\"\r\n exit\r\nfi",
"container": "debian:buster-slim", "container": "debian:buster-slim",
"entrypoint": "bash" "entrypoint": "bash"
} }
@ -39,7 +39,7 @@
"description": "The name of the jarfile to run the server with.", "description": "The name of the jarfile to run the server with.",
"env_variable": "SERVER_JARFILE", "env_variable": "SERVER_JARFILE",
"default_value": "server.jar", "default_value": "server.jar",
"user_viewable": false, "user_viewable": true,
"user_editable": false, "user_editable": false,
"rules": "required|string|max:20" "rules": "required|string|max:20"
}, },