From 3418b0979083536169d643b5bb94efe158fd0762 Mon Sep 17 00:00:00 2001 From: Fuggschen <64164659+Fuggschen@users.noreply.github.com> Date: Sat, 1 Oct 2022 21:59:33 +0200 Subject: [PATCH 1/2] Update egg-phantom-bot.json Changed the startup message because it has changed. Changed the installation script to delete the downloaded installation zip and extracted folder because another reinstall would try to install an old version if this zip still exists. --- bots/twitch/phantombot/egg-phantom-bot.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bots/twitch/phantombot/egg-phantom-bot.json b/bots/twitch/phantombot/egg-phantom-bot.json index bccbaca3..49bc0c49 100644 --- a/bots/twitch/phantombot/egg-phantom-bot.json +++ b/bots/twitch/phantombot/egg-phantom-bot.json @@ -4,7 +4,7 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2022-09-08T16:55:56+02:00", + "exported_at": "2022-10-01T21:57:23+02:00", "name": "PhantomBot", "author": "mail@wuffy.eu", "description": "PhantomBot is an actively developed open source interactive Twitch bot with a vibrant community that provides entertainment and moderation for your channel, allowing you to focus on what matters the most to you - your game and your viewers.", @@ -16,13 +16,13 @@ "startup": "java --add-opens java.base\/java.lang=ALL-UNNAMED -Djava.security.policy=config\/security -Dinteractive -Xms1m -Dfile.encoding=UTF-8 -jar PhantomBot.jar", "config": { "files": "{\r\n \"config\/botlogin.txt\": {\r\n \"parser\": \"properties\",\r\n \"find\": {\r\n \"baseport\": \"{{server.build.default.port}}\",\r\n \"channel\": \"{{server.build.env.CHANNEL_NAME}}\",\r\n \"owner\": \"{{server.build.env.CHANNEL_OWNER}}\",\r\n \"paneluser\": \"{{server.build.env.WEBPANEL_USERNAME}}\",\r\n \"panelpassword\": \"{{server.build.env.WEBPANEL_PASSWORD}}\",\r\n \"user\": \"{{server.build.env.BOT_TWITCH_USERNAME}}\",\r\n \"youtubekey\": \"{{server.build.env.YOUTUBE_API_KEY}}\",\r\n \"discord_token\": \"{{server.build.env.DISCORD_BOT_TOKEN}}\"\r\n }\r\n }\r\n}", - "startup": "{\r\n \"done\": \"Connecting to Twitch WS-IRC Server\"\r\n}", + "startup": "{\r\n \"done\": \"Joined \"\r\n}", "logs": "{}", "stop": "exit" }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# PhantomBot Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt -y --no-install-recommends install curl wget ca-certificates unzip\r\n\r\ncd \/tmp\r\n\r\n# Fetching latest github release\r\nif [ -z \"${RELEASE_VERSION}\" ] || [ \"${RELEASE_VERSION}\" == \"master\" ]; then\r\n echo -e \"Using latest Github Master version\"\r\n DOWNLOAD_URL=https:\/\/raw.githubusercontent.com\/PhantomBot\/nightly-build\/master\/PhantomBot-nightly-lin.zip\r\nelse\r\n if [ -z \"${RELEASE_VERSION}\" ] || [ \"${RELEASE_VERSION}\" == \"latest\" ]; then\r\n echo -e \"Using latest release version\"\r\n RELEASE_VERSION=$(curl -s \"https:\/\/api.github.com\/repos\/PhantomBot\/PhantomBot\/releases\/latest\" | grep -e '\"tag_name\"' | sed -E 's\/.*\"([^\"]+)\".*\/\\1\/' | sed 's\/^.\/\/')\r\n fi\r\n DOWNLOAD_URL=https:\/\/github.com\/PhantomBot\/PhantomBot\/releases\/download\/v${RELEASE_VERSION}\/PhantomBot-${RELEASE_VERSION}-lin.zip\r\n echo -e \"${DOWNLOAD_URL}\"\r\nfi\r\n\r\n# Download files\r\ncd \/mnt\/server\r\nwget ${DOWNLOAD_URL}\r\nunzip -o PhantomBot-*.zip\r\n\r\n# Move unzipped files into the server folder\r\ncp -f -r .\/PhantomBot-*\/* \/mnt\/server\/\r\n\r\n# Creating default config\r\nif [ ! -f \/mnt\/server\/config\/botlogin.txt ]; then\r\n echo -e \"Creating config\/botlogin.txt\"\r\n cat << EOF > \/mnt\/server\/config\/botlogin.txt\r\n #PhantomBot Configuration File\r\n #\r\n # Here is a list wiht all config values:\r\n # https:\/\/community.phantom.bot\/t\/settings-for-botlogin-txt\/78\r\n #\r\n apioauth=\r\n baseport=\r\n channel=\r\n oauth=\r\n owner=\r\n panelpassword=\r\n paneluser=\r\n user=\r\n youtubekey=\r\n discord_token=\r\nEOF\r\nfi", + "script": "#!\/bin\/bash\r\n# PhantomBot Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt -y --no-install-recommends install curl wget ca-certificates unzip\r\n\r\ncd \/tmp\r\n\r\n# Fetching latest github release\r\nif [ -z \"${RELEASE_VERSION}\" ] || [ \"${RELEASE_VERSION}\" == \"master\" ]; then\r\n echo -e \"Using latest Github Master version\"\r\n DOWNLOAD_URL=https:\/\/raw.githubusercontent.com\/PhantomBot\/nightly-build\/master\/PhantomBot-nightly-lin.zip\r\nelse\r\n if [ -z \"${RELEASE_VERSION}\" ] || [ \"${RELEASE_VERSION}\" == \"latest\" ]; then\r\n echo -e \"Using latest release version\"\r\n RELEASE_VERSION=$(curl -s \"https:\/\/api.github.com\/repos\/PhantomBot\/PhantomBot\/releases\/latest\" | grep -e '\"tag_name\"' | sed -E 's\/.*\"([^\"]+)\".*\/\\1\/' | sed 's\/^.\/\/')\r\n fi\r\n DOWNLOAD_URL=https:\/\/github.com\/PhantomBot\/PhantomBot\/releases\/download\/v${RELEASE_VERSION}\/PhantomBot-${RELEASE_VERSION}-lin.zip\r\n echo -e \"${DOWNLOAD_URL}\"\r\nfi\r\n\r\n# Download files\r\ncd \/mnt\/server\r\nwget ${DOWNLOAD_URL}\r\n\r\n# Unzip files and delete the archive\r\nunzip -o PhantomBot-*.zip\r\nrm PhantomBot-*.zip\r\n\r\n# Move unzipped files into the server folder and delete the folder \r\ncp -f -r .\/PhantomBot-*\/* \/mnt\/server\/\r\nrm -rf PhantomBot-*\/\r\n\r\n# Creating default config\r\nif [ ! -f \/mnt\/server\/config\/botlogin.txt ]; then\r\n echo -e \"Creating config\/botlogin.txt\"\r\n cat << EOF > \/mnt\/server\/config\/botlogin.txt\r\n #PhantomBot Configuration File\r\n #\r\n # Here is a list wiht all config values:\r\n # https:\/\/community.phantom.bot\/t\/settings-for-botlogin-txt\/78\r\n #\r\n apioauth=\r\n baseport=\r\n channel=\r\n oauth=\r\n owner=\r\n panelpassword=\r\n paneluser=\r\n user=\r\n youtubekey=\r\n discord_token=\r\nEOF\r\nfi", "container": "debian:buster-slim", "entrypoint": "bash" } From f44cdfe32dbf62eeb6fcec68cb426370c67a0bd1 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Sun, 2 Oct 2022 18:30:51 +0200 Subject: [PATCH 2/2] PhantomBot cleanup --- bots/twitch/phantombot/egg-phantom-bot.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bots/twitch/phantombot/egg-phantom-bot.json b/bots/twitch/phantombot/egg-phantom-bot.json index 49bc0c49..ede55fc3 100644 --- a/bots/twitch/phantombot/egg-phantom-bot.json +++ b/bots/twitch/phantombot/egg-phantom-bot.json @@ -4,7 +4,7 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2022-10-01T21:57:23+02:00", + "exported_at": "2022-10-02T18:28:42+02:00", "name": "PhantomBot", "author": "mail@wuffy.eu", "description": "PhantomBot is an actively developed open source interactive Twitch bot with a vibrant community that provides entertainment and moderation for your channel, allowing you to focus on what matters the most to you - your game and your viewers.", @@ -22,8 +22,8 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# PhantomBot Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt -y --no-install-recommends install curl wget ca-certificates unzip\r\n\r\ncd \/tmp\r\n\r\n# Fetching latest github release\r\nif [ -z \"${RELEASE_VERSION}\" ] || [ \"${RELEASE_VERSION}\" == \"master\" ]; then\r\n echo -e \"Using latest Github Master version\"\r\n DOWNLOAD_URL=https:\/\/raw.githubusercontent.com\/PhantomBot\/nightly-build\/master\/PhantomBot-nightly-lin.zip\r\nelse\r\n if [ -z \"${RELEASE_VERSION}\" ] || [ \"${RELEASE_VERSION}\" == \"latest\" ]; then\r\n echo -e \"Using latest release version\"\r\n RELEASE_VERSION=$(curl -s \"https:\/\/api.github.com\/repos\/PhantomBot\/PhantomBot\/releases\/latest\" | grep -e '\"tag_name\"' | sed -E 's\/.*\"([^\"]+)\".*\/\\1\/' | sed 's\/^.\/\/')\r\n fi\r\n DOWNLOAD_URL=https:\/\/github.com\/PhantomBot\/PhantomBot\/releases\/download\/v${RELEASE_VERSION}\/PhantomBot-${RELEASE_VERSION}-lin.zip\r\n echo -e \"${DOWNLOAD_URL}\"\r\nfi\r\n\r\n# Download files\r\ncd \/mnt\/server\r\nwget ${DOWNLOAD_URL}\r\n\r\n# Unzip files and delete the archive\r\nunzip -o PhantomBot-*.zip\r\nrm PhantomBot-*.zip\r\n\r\n# Move unzipped files into the server folder and delete the folder \r\ncp -f -r .\/PhantomBot-*\/* \/mnt\/server\/\r\nrm -rf PhantomBot-*\/\r\n\r\n# Creating default config\r\nif [ ! -f \/mnt\/server\/config\/botlogin.txt ]; then\r\n echo -e \"Creating config\/botlogin.txt\"\r\n cat << EOF > \/mnt\/server\/config\/botlogin.txt\r\n #PhantomBot Configuration File\r\n #\r\n # Here is a list wiht all config values:\r\n # https:\/\/community.phantom.bot\/t\/settings-for-botlogin-txt\/78\r\n #\r\n apioauth=\r\n baseport=\r\n channel=\r\n oauth=\r\n owner=\r\n panelpassword=\r\n paneluser=\r\n user=\r\n youtubekey=\r\n discord_token=\r\nEOF\r\nfi", - "container": "debian:buster-slim", + "script": "#!\/bin\/bash\r\n# PhantomBot Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt -y --no-install-recommends install curl wget ca-certificates unzip\r\n\r\ncd \/tmp\r\n\r\n# Fetching latest github release\r\nif [ -z \"${RELEASE_VERSION}\" ] || [ \"${RELEASE_VERSION}\" == \"master\" ]; then\r\n echo -e \"Using latest Github Master version\"\r\n DOWNLOAD_URL=https:\/\/raw.githubusercontent.com\/PhantomBot\/nightly-build\/master\/PhantomBot-nightly-lin.zip\r\nelse\r\n if [ -z \"${RELEASE_VERSION}\" ] || [ \"${RELEASE_VERSION}\" == \"latest\" ]; then\r\n echo -e \"Using latest release version\"\r\n RELEASE_VERSION=$(curl -s \"https:\/\/api.github.com\/repos\/PhantomBot\/PhantomBot\/releases\/latest\" | grep -e '\"tag_name\"' | sed -E 's\/.*\"([^\"]+)\".*\/\\1\/' | sed 's\/^.\/\/')\r\n fi\r\n DOWNLOAD_URL=https:\/\/github.com\/PhantomBot\/PhantomBot\/releases\/download\/v${RELEASE_VERSION}\/PhantomBot-${RELEASE_VERSION}-lin.zip\r\n echo -e \"${DOWNLOAD_URL}\"\r\nfi\r\n\r\n# Download files\r\ncd \/mnt\/server\r\nwget ${DOWNLOAD_URL} -O PhantomBot.zip\r\n\r\n# Unzip files and delete the archive\r\nunzip -o PhantomBot.zip\r\nrm PhantomBot.zip\r\n\r\n# Move unzipped files into the server folder and delete the folder \r\ncp -f -r .\/PhantomBot-*\/* \/mnt\/server\/\r\nrm -rf PhantomBot-*\/\r\n\r\n# Creating default config\r\nif [ ! -f \/mnt\/server\/config\/botlogin.txt ]; then\r\n echo -e \"Creating config\/botlogin.txt\"\r\n cat << EOF > \/mnt\/server\/config\/botlogin.txt\r\n #PhantomBot Configuration File\r\n #\r\n # Here is a list wiht all config values:\r\n # https:\/\/community.phantom.bot\/t\/settings-for-botlogin-txt\/78\r\n #\r\n apioauth=\r\n baseport=\r\n channel=\r\n oauth=\r\n owner=\r\n panelpassword=\r\n paneluser=\r\n user=\r\n youtubekey=\r\n discord_token=\r\nEOF\r\nfi\r\necho \"install finished\"", + "container": "debian:bullseye-slim", "entrypoint": "bash" } }, @@ -109,4 +109,4 @@ "field_type": "text" } ] -} +} \ No newline at end of file