mirror of
https://github.com/parkervcp/eggs.git
synced 2024-11-25 23:33:00 +08:00
58 lines
4.8 KiB
JSON
58 lines
4.8 KiB
JSON
{
|
|
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
|
|
"meta": {
|
|
"version": "PTDL_v1",
|
|
"update_url": null
|
|
},
|
|
"exported_at": "2021-01-29T22:41:09+02:00",
|
|
"name": "JMusicBot",
|
|
"author": "parker@parkervcp.com",
|
|
"description": "A Discord music bot that's easy to set up and run yourself!",
|
|
"features": null,
|
|
"images": [
|
|
"quay.io\/parkervcp\/pterodactyl-images:debian_openjdk-8-jre"
|
|
],
|
|
"startup": "java -Djavax.accessibility.assistive_technologies=\" \" -Dnogui=true -jar JMusicBot.jar",
|
|
"config": {
|
|
"files": "{\r\n \"config.txt\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"token =\": \"token = \\\"{{env.BOT_TOKEN}}\\\"\",\r\n \"prefix =\": \"prefix = \\\"{{env.BOT_PREFIX}}\\\"\",\r\n \"owner =\": \"owner = \\\"{{env.BOT_OWNER}}\\\"\"\r\n }\r\n }\r\n}",
|
|
"startup": "{\r\n \"done\": \"Finished Loading\"\r\n}",
|
|
"logs": "{}",
|
|
"stop": "^C"
|
|
},
|
|
"scripts": {
|
|
"installation": {
|
|
"script": "#!\/bin\/bash\r\n## this is a simple script to use the github API for release versions.\r\n## this requires the egg has a variable for GITHUB_PACKAGE and VERSION\r\n## this supports using oauth\/personal access tokens via GITHUB_USER and GITHUB_OAUTH_TOKEN (both are required.)\r\n## if you are getting hit with GitHub API limit issues then you need to have the user and token set.\r\n\r\napt update\r\napt install -y jq curl\r\n\r\nGITHUB_PACKAGE=\"jagrosh\/MusicBot\"\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\/playlist.txt\"\r\n\r\nif [ -z \"${GITHUB_USER}\" ] && [ -z \"${GITHUB_OAUTH_TOKEN}\" ] ; then\r\n echo -e \"no github user set, 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\/${GITHUB_PACKAGE}\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\")\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_LINK=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)\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_LINK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i config)\r\n else\r\n echo -e \"defaulting to the latest release\"\r\n DOWNLOAD_LINK=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)\r\n fi\r\nfi\r\n\r\n[ ! -d \/mnt\/server ] && mkdir \/mnt\/server\r\n\r\ncd \/mnt\/server\r\n\r\nif [ -f JMusicBot.jar ]; then\r\n mv -f JMusicBot.jar JMusicBot.jar-old\r\nfi\r\n\r\ncurl -Lo JMusicBot.jar ${DOWNLOAD_LINK}\r\n\r\nif [ -f config.txt ]; then\r\n echo -e \"config already exists\"\r\nelse\r\n echo -e \"config not found, downloading default config\"\r\n curl -Lo config.txt ${CONFIG_LINK}\r\nfi\r\n\r\nif [ -f playlist.txt ]; then\r\n echo -e \"playlist already exists\"\r\nelse\r\n echo -e \"playlist not found, downloading default playlist\"\r\n curl -Lo playlist.txt ${PLAYLIST_LINK}\r\nfi\r\n\r\necho \"Job's Done\"",
|
|
"container": "debian:buster-slim",
|
|
"entrypoint": "\/bin\/bash"
|
|
}
|
|
},
|
|
"variables": [
|
|
{
|
|
"name": "Discord Bot Token",
|
|
"description": "The token for your discord bot.\r\n\r\nhttps:\/\/discord.com\/developers\/applications\/",
|
|
"env_variable": "BOT_TOKEN",
|
|
"default_value": "You need to get a token",
|
|
"user_viewable": true,
|
|
"user_editable": true,
|
|
"rules": "required|string|max:64"
|
|
},
|
|
{
|
|
"name": "Bot Prefix",
|
|
"description": "The prefix for the bot.\r\n\r\nDefault is to @mention the bot.",
|
|
"env_variable": "BOT_PREFIX",
|
|
"default_value": "@mention",
|
|
"user_viewable": true,
|
|
"user_editable": true,
|
|
"rules": "required|string|max:20"
|
|
},
|
|
{
|
|
"name": "Bot Owner ID",
|
|
"description": "This is the user ID of the bot owner. It's a long numeric ID, such as 4440512350692326306",
|
|
"env_variable": "BOT_OWNER",
|
|
"default_value": "Change This To Your Discord User ID",
|
|
"user_viewable": true,
|
|
"user_editable": true,
|
|
"rules": "required|string|max:32"
|
|
}
|
|
]
|
|
} |