Fix GH-2474 (#2475)

* Fix GH-2474

* Update JMusicBot images

switch to Java LTS and use the official installer image
This commit is contained in:
Philip T 2023-09-20 23:31:29 +02:00 committed by GitHub
parent c3a9240ee9
commit 5620a4ad8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,13 +4,13 @@
"version": "PTDL_v2", "version": "PTDL_v2",
"update_url": null "update_url": null
}, },
"exported_at": "2023-07-29T17:52:45+02:00", "exported_at": "2023-09-20T21:17:10+02:00",
"name": "JMusicBot", "name": "JMusicBot",
"author": "parker@parkervcp.com", "author": "parker@parkervcp.com",
"description": "A Discord music bot that's easy to set up and run yourself!", "description": "A Discord music bot that's easy to set up and run yourself!",
"features": null, "features": null,
"docker_images": { "docker_images": {
"ghcr.io\/pterodactyl\/yolks:java_16": "ghcr.io\/pterodactyl\/yolks:java_16" "ghcr.io\/pterodactyl\/yolks:java_17": "ghcr.io\/pterodactyl\/yolks:java_17"
}, },
"file_denylist": [], "file_denylist": [],
"startup": "java -Dnogui=true -jar JMusicBot.jar", "startup": "java -Dnogui=true -jar JMusicBot.jar",
@ -23,7 +23,7 @@
"scripts": { "scripts": {
"installation": { "installation": {
"script": "#!\/bin\/bash\r\n\r\napt update\r\napt install -y jq curl\r\n\r\nCONFIG_LINK=\"https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/bots\/discord\/jmusicbot\/config.txt\"\r\nPLAYLIST_LINK=\"https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/bots\/discord\/jmusicbot\/example_playlist.txt\"\r\n\r\n\r\nif [ -z \"${GITHUB_USER}\" ] && [ -z \"${GITHUB_OAUTH_TOKEN}\" ] ; then\r\n echo -e \"using anon api call\"\r\nelse\r\n echo -e \"user and oauth token set\"\r\n alias curl='curl -u ${GITHUB_USER}:${GITHUB_OAUTH_TOKEN} '\r\nfi\r\n\r\n## get release info and download links\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/jagrosh\/MusicBot\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/jagrosh\/MusicBot\/releases\")\r\nMATCH=JMusicBot\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 ${MATCH})\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 ${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\nfi\r\n\r\n## JMusicBot Setup\r\n[ ! -d \/mnt\/server ] && mkdir \/mnt\/server\r\ncd \/mnt\/server\r\necho -e \"\\nInstalling\/Updating JMusicBot...\\n\"\r\n\r\nif [ -f JMusicBot.jar ]; then\r\n echo -e \"Updating JMusicBot.jar to latest version...\"\r\n echo -e '\\t(Old version can be found at \"JMusicBot.jar-old\")'\r\n mv -f JMusicBot.jar JMusicBot.jar-old\r\nfi\r\n\r\necho -e \"Running: curl -sSLo JMusicBot.jar ${DOWNLOAD_URL}\\n\"\r\ncurl -sSLo JMusicBot.jar ${DOWNLOAD_URL}\r\n\r\nif [ -f config.txt ]; then\r\n echo -e \"Updating config.txt to latest version...\"\r\n echo -e '\\t(Old version can be found at \"config.txt-old\")'\r\n mv -f config.txt config.txt-old\r\nfi\r\necho -e \"Running: curl -sSLo config.txt ${CONFIG_LINK}\\n\"\r\ncurl -sSLo config.txt ${CONFIG_LINK}\r\n\r\n[ ! -d Playlists ] && mkdir Playlists\r\ncd Playlists\r\nif [ -f example_playlist.txt ]; then\r\n echo -e \"example_playlist.txt already exists. Skipping default download.\"\r\nelse\r\n echo -e \"example_playlist.txt not found. Downloading default example_playlist...\"\r\n echo -e \"Running: curl -sSLo example_playlist.txt ${PLAYLIST_LINK}\"\r\n curl -sSLo example_playlist.txt ${PLAYLIST_LINK}\r\nfi\r\n\r\necho -e \"\\nJMusicBot Successfully Installed!\"", "script": "#!\/bin\/bash\r\n\r\napt update\r\napt install -y jq curl\r\n\r\nCONFIG_LINK=\"https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/bots\/discord\/jmusicbot\/config.txt\"\r\nPLAYLIST_LINK=\"https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/bots\/discord\/jmusicbot\/example_playlist.txt\"\r\n\r\n\r\nif [ -z \"${GITHUB_USER}\" ] && [ -z \"${GITHUB_OAUTH_TOKEN}\" ] ; then\r\n echo -e \"using anon api call\"\r\nelse\r\n echo -e \"user and oauth token set\"\r\n alias curl='curl -u ${GITHUB_USER}:${GITHUB_OAUTH_TOKEN} '\r\nfi\r\n\r\n## get release info and download links\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/jagrosh\/MusicBot\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/jagrosh\/MusicBot\/releases\")\r\nMATCH=JMusicBot\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 ${MATCH})\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 ${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\nfi\r\n\r\n## JMusicBot Setup\r\n[ ! -d \/mnt\/server ] && mkdir \/mnt\/server\r\ncd \/mnt\/server\r\necho -e \"\\nInstalling\/Updating JMusicBot...\\n\"\r\n\r\nif [ -f JMusicBot.jar ]; then\r\n echo -e \"Updating JMusicBot.jar to latest version...\"\r\n echo -e '\\t(Old version can be found at \"JMusicBot.jar-old\")'\r\n mv -f JMusicBot.jar JMusicBot.jar-old\r\nfi\r\n\r\necho -e \"Running: curl -sSLo JMusicBot.jar ${DOWNLOAD_URL}\\n\"\r\ncurl -sSLo JMusicBot.jar ${DOWNLOAD_URL}\r\n\r\nif [ -f config.txt ]; then\r\n echo -e \"Updating config.txt to latest version...\"\r\n echo -e '\\t(Old version can be found at \"config.txt-old\")'\r\n mv -f config.txt config.txt-old\r\nfi\r\necho -e \"Running: curl -sSLo config.txt ${CONFIG_LINK}\\n\"\r\ncurl -sSLo config.txt ${CONFIG_LINK}\r\n\r\n[ ! -d Playlists ] && mkdir Playlists\r\ncd Playlists\r\nif [ -f example_playlist.txt ]; then\r\n echo -e \"example_playlist.txt already exists. Skipping default download.\"\r\nelse\r\n echo -e \"example_playlist.txt not found. Downloading default example_playlist...\"\r\n echo -e \"Running: curl -sSLo example_playlist.txt ${PLAYLIST_LINK}\"\r\n curl -sSLo example_playlist.txt ${PLAYLIST_LINK}\r\nfi\r\n\r\necho -e \"\\nJMusicBot Successfully Installed!\"",
"container": "debian:bullseye-slim", "container": "ghcr.io\/parkervcp\/installers:debian",
"entrypoint": "\/bin\/bash" "entrypoint": "\/bin\/bash"
} }
}, },
@ -45,7 +45,7 @@
"default_value": "Change This To Your Discord User ID", "default_value": "Change This To Your Discord User ID",
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "required|digits:18", "rules": "required|digits_between:17,18",
"field_type": "text" "field_type": "text"
}, },
{ {