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

Merge pull request #677 from gOOvER/sogebot

Update/sogeBot - Cleanup Installscript and added missing link to readme
This commit is contained in:
Michael (Parker) Parker 2020-09-23 17:29:09 -04:00 committed by GitHub
commit f4a78a7489
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 5 deletions

View File

@ -41,6 +41,7 @@ If you are reading this it looks like you are looking to add an egg to your serv
* [Twitch](/bots/twitch) * [Twitch](/bots/twitch)
* [PhantomBot](/bots/twitch/phantombot/) * [PhantomBot](/bots/twitch/phantombot/)
* [sogeBot](/bots/twitch/sogebot/)
* [TeamSpeak3](bots/teamspeak3) * [TeamSpeak3](bots/teamspeak3)
* [JTS3ServerMod](/bots/teamspeak3/jts3servermod/) * [JTS3ServerMod](/bots/teamspeak3/jts3servermod/)

View File

@ -3,24 +3,52 @@
"meta": { "meta": {
"version": "PTDL_v1" "version": "PTDL_v1"
}, },
"exported_at": "2020-08-23T07:11:32+02:00", "exported_at": "2020-09-06T10:51:50+02:00",
"name": "SogeBot", "name": "SogeBot",
"author": "info@goover.de", "author": "info@goover.de",
"description": "sogeBot - Free Twitch Bot built on Node.js https:\/\/sogebot.xyz\/", "description": "sogeBot - Free Twitch Bot built on Node.js https:\/\/sogebot.xyz\/",
"image": "quay.io\/parkervcp\/pterodactyl-images:debian_nodejs-12", "image": "quay.io\/parkervcp\/pterodactyl-images:debian_nodejs-12",
"startup": "npm start", "startup": "npm start",
"config": { "config": {
"files": "{\r\n \".env\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"PORT=\": \"PORT={{server.build.default.port}}\"\r\n }\r\n }\r\n}", "files": "{\r\n \".env\": {\r\n \"parser\": \"properties\",\r\n \"find\": {\r\n \"PORT\": \"{{server.build.default.port}}\"\r\n }\r\n }\r\n}",
"startup": "{\r\n \"done\": \"WebPanel is available at\"\r\n}", "startup": "{\r\n \"done\": \"WebPanel is available at\"\r\n}",
"logs": "{\r\n \"custom\": false,\r\n \"location\": \"logs\/latest.log\"\r\n}", "logs": "{\r\n \"custom\": false,\r\n \"location\": \"logs\/latest.log\"\r\n}",
"stop": "^C" "stop": "^C"
}, },
"scripts": { "scripts": {
"installation": { "installation": {
"script": "#\/bin\/ash\r\napt -y update\r\napt -y upgrade\r\napt install -y curl unzip sqlite\r\nexport NODE_OPTIONS=--max-old-space-size=8192\r\n\r\ncd \/mnt\/server\r\n\r\n## Download latest Stable Version\r\nRELEASE_VERSION=$(curl -s \"https:\/\/api.github.com\/repos\/sogehige\/sogeBot\/releases\/latest\" | awk -F '\"' '\/tag_name\/{print $4}')\r\nDOWNLOAD_URL=https:\/\/github.com\/sogehige\/sogeBot\/releases\/download\/${RELEASE_VERSION}\/sogeBot-${RELEASE_VERSION}.zip\r\ncurl -L -o sogebot.zip ${DOWNLOAD_URL}\r\nunzip -o sogebot.zip\r\nrm sogebot.zip\r\n\r\n##Setting up new configration. Default: sqlite\r\nrm -rf \/mnt\/server\/.env\r\n\r\ncat <<EOT > \/mnt\/server\/.env\r\nTYPEORM_CONNECTION=sqlite\r\nTYPEORM_DATABASE=.\/sogebot.db\r\nPORT=20000\r\n\r\n# DON'T CHANGE ANYTHING BELOW THIS LINE\r\nTYPEORM_ENTITIES=dest\/database\/entity\/*.js\r\nTYPEORM_MIGRATIONS=dest\/database\/migration\/sqlite\/*.js\r\nTYPEORM_SUBSCRIBERS=dest\/database\/entity\/*.js\r\n\r\nTYPEORM_ENTITIES_DIR=src\/bot\/database\/entity\r\nTYPEORM_MIGRATIONS_DIR=src\/bot\/database\/migration\/sqlite\r\nTYPEORM_SUBSCRIBERS_DIR=src\/bot\/database\/entity\r\nEOT\r\n\r\nnpm install -g npm@latest\r\n\r\necho -e \"## Downloading npm components\"\r\n\/usr\/local\/bin\/npm ci\r\n\r\nexit 0", "script": "#\/bin\/bash\r\napt -y update\r\napt -y upgrade\r\napt install -y curl unzip sqlite jq wget\r\n#export NODE_OPTIONS=--max-old-space-size=8192\r\n\r\ncd \/mnt\/server\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 | 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_LINK=$(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_LINK=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)\r\n fi\r\nfi\r\n\r\n#echo $DOWNLOAD_LINK\r\nwget -N $DOWNLOAD_LINK\r\nunzip $MATCH-*.zip\r\nrm -fR unzip $MATCH-*.zip\r\n\r\nnpm install -g npm@latest\r\n\/usr\/local\/bin\/npm ci\r\n\r\nexit 0",
"container": "node:12-buster-slim", "container": "node:12-buster-slim",
"entrypoint": "bash" "entrypoint": "bash"
} }
}, },
"variables": [] "variables": [
} {
"name": "Github Package",
"description": "the Github Package",
"env_variable": "GITHUB_PACKAGE",
"default_value": "sogehige\/sogeBot",
"user_viewable": true,
"user_editable": false,
"rules": "required|string|max:20"
},
{
"name": "Version",
"description": "choose Version, you want to install. Defaul: Latest",
"env_variable": "VERSION",
"default_value": "latest",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:20"
},
{
"name": "Filename",
"description": "Filename",
"env_variable": "MATCH",
"default_value": "sogeBot",
"user_viewable": true,
"user_editable": false,
"rules": "required|string|max:20"
}
]
}