From 020bd0eaab83cbeedf38fff39cacfbbc7b92f798 Mon Sep 17 00:00:00 2001 From: Parkeymon <68636315+Parkeymon@users.noreply.github.com> Date: Sun, 22 Aug 2021 15:55:42 -0700 Subject: [PATCH] compile to egg from PR #4 --- SCP-SL-Exiled-Egg.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SCP-SL-Exiled-Egg.json b/SCP-SL-Exiled-Egg.json index 2408bb8..419f24b 100644 --- a/SCP-SL-Exiled-Egg.json +++ b/SCP-SL-Exiled-Egg.json @@ -4,7 +4,7 @@ "version": "PTDL_v1", "update_url": null }, - "exported_at": "2021-07-22T16:41:40-07:00", + "exported_at": "2021-08-22T15:53:55-07:00", "name": "EXILED SCP:SL Egg", "author": "pwolfe@stealthturtle.com", "description": "Egg for SCP: Secret Laboratory Dedicated Linux Server", @@ -16,13 +16,13 @@ "startup": ".\/start.sh {{SERVER_PORT}}", "config": { "files": "{\r\n \"config_gameplay.txt\": {\r\n \"parser\": \"yaml\",\r\n \"find\": {\r\n \"server_ip\": \"0.0.0.0\",\r\n \"forward_ports\": \"false\"\r\n }\r\n }\r\n}", - "startup": "{\r\n \"done\": \"Waiting for players..\",\r\n \"userInteraction\": []\r\n}", + "startup": "{\"done\": \"Waiting for players..\"}", "logs": "{}", "stop": "exit" }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# steamcmd Base Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n\r\necho \"\r\n$(tput setaf 4) ____________________________ ______________ \r\n$(tput setaf 4) \/ _____\/\\_ ___ \\______ \\ \/\\ \/ _____\/| | \r\n$(tput setaf 4) \\_____ \\ \/ \\ \\\/| ___\/ \\\/ \\_____ \\ | | \r\n$(tput setaf 4) \/ || \\___| | \/\\ \/ \\| |___ \r\n$(tput setaf 4)\/_________\/ \\________\/____| \\\/ \/_________\/|________|\r\n$(tput setaf 1) ___ __ __ __ \r\n$(tput setaf 1)| | ____ _______\/ |______ | | | | ___________ \r\n$(tput setaf 1)| |\/ \\ \/ ___\/\\ __\\__ \\ | | | | _\/ __ \\_ __ |\r\n$(tput setaf 1)| | | |\\___ \\ | | \/ __ \\| |_| |_\\ ___\/| | \\\/\r\n$(tput setaf 1)|___|___|__\/______> |__| (______|____|____\/\\___ |__| \r\n$(tput setaf 0)\r\n\"\r\n\r\necho \"\r\n$(tput setaf 2)This installer was created by $(tput setaf 1)Parkeymon#0001\r\n\"\r\n\r\n# Egg version checking, do not touch!\r\ncurrentVersion=\"2.1.3\"\r\nlatestVersion=$(curl --silent \"https:\/\/api.github.com\/repos\/Parkeymon\/EXILED-SCP-SL-egg\/releases\/latest\" | jq -r .tag_name)\r\n\r\nif [ \"${currentVersion}\" == \"${latestVersion}\" ]; then\r\n echo \"$(tput setaf 2)Installer is up to date\"\r\nelse\r\n\r\n echo \"\r\n $(tput setaf 1)THE INSTALLER IS NOT UP TO DATE!\r\n\r\n Current Version: $(tput setaf 1)${currentVersion}\r\n Latest: $(tput setaf 2)${latestVersion}\r\n\r\n $(tput setaf 3)Please update to the latest version found here: https:\/\/github.com\/Parkeymon\/EXILED-SCP-SL-egg\/releases\/latest\r\n\r\n \"\r\n sleep 10\r\nfi\r\n\r\n# Download SteamCMD and Install\r\ncd \/tmp || {\r\n echo \"$(tput setaf 1) FAILED TO MOUNT TO \/TMP\"\r\n exit\r\n}\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\ncd \/mnt\/server\/steamcmd || {\r\n echo \"$(tput setaf 1) FAILED TO MOUNT TO \/mnt\/server\/steamcmd\"\r\n exit\r\n}\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\nif [ \"${BETA_TAG}\" == \"none\" ]; then\r\n .\/steamcmd.sh +login anonymous +force_install_dir \/mnt\/server +app_update \"${SRCDS_APPID}\" validate +quit\r\nelse\r\n .\/steamcmd.sh +login anonymous +force_install_dir \/mnt\/server +app_update \"${SRCDS_APPID}\" \"${BETA_TAG}\" validate +quit\r\nfi\r\n\r\n# Install SL with SteamCMD\r\ncd \/mnt\/server || {\r\n echo \"$(tput setaf 1) FAILED TO MOUNT TO \/mnt\/server\"\r\n exit\r\n}\r\n\r\necho \"$(tput setaf 4)Configuring start.sh$(tput setaf 0)\"\r\nrm start.sh\r\ntouch \"start.sh\"\r\nchmod +x .\/start.sh\r\n\r\nmkdir .egg\r\n\r\nif [ \"${INSTALL_BOT}\" == \"true\" ]; then\r\n echo \"#!\/bin\/bash\r\n node discordIntegration.js > \/dev\/null &\r\n .\/LocalAdmin \\${SERVER_PORT}\" >>start.sh\r\n echo \"$(tput setaf 4)Finished configuring start.sh for LocalAdmin and Discord Integration.$(tput setaf 0)\"\r\n\r\nelse\r\n echo \"#!\/bin\/bash\r\n .\/LocalAdmin \\${SERVER_PORT}\" >>start.sh\r\n echo \"$(tput setaf 4)Finished configuring start.sh for LocalAdmin.$(tput setaf 0)\"\r\n\r\nfi\r\n\r\nif [ \"${INSTALL_BOT}\" == \"true\" ]; then\r\n\r\n if [ \"${CONFIG_SAVER}\" == \"true\" ]; then\r\n echo \"$(tput setaf 4)Config Saver is $(tput setaf 2)ENABLED\"\r\n echo \"Making temporary directory\"\r\n mkdir BotConfigTemp\r\n echo \"Moving config.\"\r\n mv config.yml .\/BotConfigTemp\r\n fi\r\n\r\n echo \"$(tput setaf 4)Installing latest Discord Integration bot version.\"\r\n wget -q https:\/\/github.com\/Exiled-Team\/DiscordIntegration\/releases\/latest\/download\/DiscordIntegration.Bot.tar.gz\r\n tar xzvf DiscordIntegration.Bot.tar.gz\r\n rm DiscordIntegration.Bot.tar.gz\r\n\r\n if [ \"${CONFIG_SAVER}\" == \"true\" ]; then\r\n echo \"Deleting config\"\r\n rm config.yml\r\n echo \"Replacing Config\"\r\n mv .\/BotConfigTemp\/config.yml .\/\r\n echo \"Removing temporary directory\"\r\n rm -r BotConfigTemp\r\n echo \"$(tput setaf 4)Your configs have been saved!\"\r\n fi\r\n\r\n echo \"$(tput setaf 4)Updating Packages\"\r\n yarn install\r\n\r\nelse\r\n echo \"$(tput setaf 4)Skipping bot install...$(tput setaf 0)\"\r\nfi\r\n\r\nif [ \"${INSTALL_EXILED}\" == \"true\" ]; then\r\n echo \"$(tput setaf 4)Downloading $(tput setaf 1)EXILED$(tput setaf 0)..\"\r\n mkdir .config\/\r\n echo \"$(tput setaf 4)Downloading latest $(tput setaf 1)EXILED$(tput setaf 4) Installer\"\r\n rm Exiled.Installer-Linux\r\n wget -q https:\/\/github.com\/galaxy119\/EXILED\/releases\/latest\/download\/Exiled.Installer-Linux\r\n chmod +x .\/Exiled.Installer-Linux\r\n\r\n if [ \"${EXILED_PRE}\" == \"true\" ]; then\r\n echo \"$(tput setaf 4)Installing $(tput setaf 1)EXILED (pre-release)...\"\r\n .\/Exiled.Installer-Linux --pre-releases\r\n\r\n elif [ \"${EXILED_PRE}\" == \"false\" ]; then\r\n echo \"$(tput setaf 4)Installing $(tput setaf 1)EXILED$(tput setaf 0)...\"\r\n .\/Exiled.Installer-Linux\r\n\r\n else\r\n echo \"$(tput setaf 4)Installing $(tput setaf 1)EXILED$(tput setaf 0) version: ${EXILED_PRE} ..\"\r\n .\/Exiled.Installer-Linux --target-version \"${EXILED_PRE}\"\r\n\r\n fi\r\nelse\r\n echo \"Skipping Exiled installation.\"\r\nfi\r\n\r\nif [ \"${REMOVE_UPDATER}\" == \"true\" ]; then\r\n echo \"Removing Exiled updater.\"\r\n rm \/mnt\/server\/.config\/EXILED\/Plugins\/Exiled.Updater.dll\r\nelse\r\n echo \"Skipping EXILED updater removal.\"\r\nfi\r\n\r\nif [ \"${INSTALL_INTEGRATION}\" == \"true\" ]; then\r\n echo \"Installing Latest Discord Integration Plugin...\"\r\n\r\n echo \"Removing old Discord Integration (if it exists)\"\r\n rm \/mnt\/server\/.config\/EXILED\/Plugins\/DiscordIntegration_Plugin.dll\r\n rm \/mnt\/server\/.config\/EXILED\/Plugins\/DiscordIntegration.dll\r\n\r\n echo \"$(tput setaf 5)Grabbing plugin and dependencies.\"\r\n wget -q https:\/\/github.com\/Exiled-Team\/DiscordIntegration\/releases\/latest\/download\/Plugin.tar.gz -P \/mnt\/server\/.config\/EXILED\/Plugins\r\n\r\n echo \"Extracting...\"\r\n tar xzvf \/mnt\/server\/.config\/EXILED\/Plugins\/Plugin.tar.gz\r\n rm \/mnt\/server\/.config\/EXILED\/Plugins\/Plugin.tar.gz\r\n\r\nelse\r\n echo \"Skipping Discord integration plugin install\"\r\nfi\r\n\r\nif [ \"${INSTALL_ADMINTOOLS}\" == \"true\" ]; then\r\n echo \"Removing existing Admin Tools version.\"\r\n rm .config\/EXILED\/Plugins\/AdminTools.dll\r\n echo \"$(tput setaf 5)Installing latest Admin Tools\"\r\n wget -q https:\/\/github.com\/Exiled-Team\/AdminTools\/releases\/latest\/download\/AdminTools.dll -P \/mnt\/server\/.config\/EXILED\/Plugins\r\n\r\nelse\r\n echo \"Skipping Admin Tools install.\"\r\nfi\r\n\r\nif [ \"${INSTALL_UTILITIES}\" == \"true\" ]; then\r\n echo \"Removing existing Common Utilities version.\"\r\n rm .config\/EXILED\/Plugins\/Common_Utilities.dll\r\n echo \"$(tput setaf 5)Installing Common Utilities.\"\r\n wget -q https:\/\/github.com\/Exiled-Team\/Common-Utils\/releases\/latest\/download\/Common_Utilities.dll -P \/mnt\/server\/.config\/EXILED\/Plugins\r\nelse\r\n echo \"Skipping Common Utilities Install\"\r\nfi\r\n\r\nif [ \"${INSTALL_SCPSTATS}\" == \"true\" ]; then\r\n echo \"Removing existing SCPStats version.\"\r\n rm .config\/EXILED\/Plugins\/SCPStats.dll\r\n echo \"$(tput setaf 5)Installing SCPStats\"\r\n wget -q https:\/\/github.com\/SCPStats\/Plugin\/releases\/latest\/download\/SCPStats.dll -P \/mnt\/server\/.config\/EXILED\/Plugins\r\nelse\r\n echo \"Skipping SCPStats Install.\"\r\nfi\r\n\r\nfunction pluginInstall() {\r\n # Caches the plugin to a json so only one request to Github is needed\r\n\r\n curl --silent -u \"${GITHUB_USERNAME}:${GITHUB_TOKEN}\" \"$1\" | jq . > plugin.json\r\n\r\n if [ \"$(jq -r .assets[0].browser_download_url plugin.json)\" == null ]; then\r\n echo \"\r\n $(tput setaf 5)ERROR GETTING PLUGIN DOWNLOAD URL!\r\n\r\n Inputted URL: $1\r\n\r\n You likely inputted the incorrect URL or have been rate-limited ( https:\/\/takeb1nzyto.space\/ )\r\n \"\r\n\r\n fi\r\n\r\n echo \"$(tput setaf 5)Installing $(jq -r .assets[0].name plugin.json) $(jq -r .tag_name plugin.json) by $(jq -r .author.login plugin.json)\"\r\n\r\n # For the evil people that put the version in their plugin name the old version will need to be manually deleted\r\n rm \/mnt\/server\/.config\/EXILED\/Plugins\/\"$(jq -r .assets[0].name plugin.json)\"\r\n\r\n echo \"$(jq -r .assets[0].browser_download_url plugin.json)\r\n \"\r\n\r\n wget -q \"$(jq -r .assets[0].browser_download_url plugin.json)\" -P \/mnt\/server\/.config\/EXILED\/Plugins\r\n\r\n rm plugin.json\r\n}\r\n\r\nif [ \"${INSTALL_CUSTOM}\" == \"true\" ]; then\r\n touch \/mnt\/server\/.egg\/customplugins.txt\r\n\r\n grep -v '^ *#' <\/mnt\/server\/.egg\/customplugins.txt | while IFS= read -r I; do\r\n pluginInstall \"${I}\"\r\n done\r\n\r\nfi\r\n\r\nif [ \"${INSTALL_BOT}\" == \"true\" ]; then\r\n echo \"Dont forget to configure the discord bot in \/home\/container\/config.yml\"\r\nfi\r\n\r\necho \"$(tput setaf 2)Installation Complete!$(tput sgr 0)\"\r\n\r\n##TODO - using git to sync configs with github\r\n\r\n##TODO - Append plugin version to file name so they dont reinstall when they dont need to be?", + "script": "#!\/bin\/bash\r\n# steamcmd Base Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n\r\necho \"\r\n$(tput setaf 4) ____________________________ ______________ \r\n$(tput setaf 4) \/ _____\/\\_ ___ \\______ \\ \/\\ \/ _____\/| | \r\n$(tput setaf 4) \\_____ \\ \/ \\ \\\/| ___\/ \\\/ \\_____ \\ | | \r\n$(tput setaf 4) \/ || \\___| | \/\\ \/ \\| |___ \r\n$(tput setaf 4)\/_________\/ \\________\/____| \\\/ \/_________\/|________|\r\n$(tput setaf 1) ___ __ __ __ \r\n$(tput setaf 1)| | ____ _______\/ |______ | | | | ___________ \r\n$(tput setaf 1)| |\/ \\ \/ ___\/\\ __\\__ \\ | | | | _\/ __ \\_ __ |\r\n$(tput setaf 1)| | | |\\___ \\ | | \/ __ \\| |_| |_\\ ___\/| | \\\/\r\n$(tput setaf 1)|___|___|__\/______> |__| (______|____|____\/\\___ |__| \r\n$(tput setaf 0)\r\n\"\r\n\r\necho \"\r\n$(tput setaf 2)This installer was created by $(tput setaf 1)Parkeymon#0001\r\n\"\r\n\r\n# Egg version checking, do not touch!\r\ncurrentVersion=\"2.1.4\"\r\nlatestVersion=$(curl --silent \"https:\/\/api.github.com\/repos\/Parkeymon\/EXILED-SCP-SL-egg\/releases\/latest\" | jq -r .tag_name)\r\n\r\nif [ \"${currentVersion}\" == \"${latestVersion}\" ]; then\r\n echo \"$(tput setaf 2)Installer is up to date\"\r\nelse\r\n\r\n echo \"\r\n $(tput setaf 1)THE INSTALLER IS NOT UP TO DATE!\r\n\r\n Current Version: $(tput setaf 1)${currentVersion}\r\n Latest: $(tput setaf 2)${latestVersion}\r\n\r\n $(tput setaf 3)Please update to the latest version found here: https:\/\/github.com\/Parkeymon\/EXILED-SCP-SL-egg\/releases\/latest\r\n\r\n \"\r\n sleep 10\r\nfi\r\n\r\n# Download SteamCMD and Install\r\ncd \/tmp || {\r\n echo \"$(tput setaf 1) FAILED TO MOUNT TO \/TMP\"\r\n exit\r\n}\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\ncd \/mnt\/server\/steamcmd || {\r\n echo \"$(tput setaf 1) FAILED TO MOUNT TO \/mnt\/server\/steamcmd\"\r\n exit\r\n}\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\nif [ \"${BETA_TAG}\" == \"none\" ]; then\r\n .\/steamcmd.sh +login anonymous +force_install_dir \/mnt\/server +app_update \"${SRCDS_APPID}\" validate +quit\r\nelse\r\n .\/steamcmd.sh +login anonymous +force_install_dir \/mnt\/server +app_update \"${SRCDS_APPID}\" -beta \"${BETA_TAG}\" validate +quit\r\nfi\r\n\r\n# Install SL with SteamCMD\r\ncd \/mnt\/server || {\r\n echo \"$(tput setaf 1) FAILED TO MOUNT TO \/mnt\/server\"\r\n exit\r\n}\r\n\r\necho \"$(tput setaf 4)Configuring start.sh$(tput setaf 0)\"\r\nrm start.sh\r\ntouch \"start.sh\"\r\nchmod +x .\/start.sh\r\n\r\nmkdir .egg\r\n\r\nif [ \"${INSTALL_BOT}\" == \"true\" ]; then\r\n echo \"#!\/bin\/bash\r\n node discordIntegration.js > \/dev\/null &\r\n .\/LocalAdmin \\${SERVER_PORT}\" >>start.sh\r\n echo \"$(tput setaf 4)Finished configuring start.sh for LocalAdmin and Discord Integration.$(tput setaf 0)\"\r\n\r\nelse\r\n echo \"#!\/bin\/bash\r\n .\/LocalAdmin \\${SERVER_PORT}\" >>start.sh\r\n echo \"$(tput setaf 4)Finished configuring start.sh for LocalAdmin.$(tput setaf 0)\"\r\n\r\nfi\r\n\r\nif [ \"${INSTALL_BOT}\" == \"true\" ]; then\r\n\r\n if [ \"${CONFIG_SAVER}\" == \"true\" ]; then\r\n echo \"$(tput setaf 4)Config Saver is $(tput setaf 2)ENABLED\"\r\n echo \"Making temporary directory\"\r\n mkdir BotConfigTemp\r\n echo \"Moving config.\"\r\n mv config.yml .\/BotConfigTemp\r\n fi\r\n\r\n echo \"$(tput setaf 4)Installing latest Discord Integration bot version.\"\r\n wget -q https:\/\/github.com\/Exiled-Team\/DiscordIntegration\/releases\/latest\/download\/DiscordIntegration.Bot.tar.gz\r\n tar xzvf DiscordIntegration.Bot.tar.gz\r\n rm DiscordIntegration.Bot.tar.gz\r\n\r\n if [ \"${CONFIG_SAVER}\" == \"true\" ]; then\r\n echo \"Deleting config\"\r\n rm config.yml\r\n echo \"Replacing Config\"\r\n mv .\/BotConfigTemp\/config.yml .\/\r\n echo \"Removing temporary directory\"\r\n rm -r BotConfigTemp\r\n echo \"$(tput setaf 4)Your configs have been saved!\"\r\n fi\r\n\r\n echo \"$(tput setaf 4)Updating Packages\"\r\n yarn install\r\n\r\nelse\r\n echo \"$(tput setaf 4)Skipping bot install...$(tput setaf 0)\"\r\nfi\r\n\r\nif [ \"${INSTALL_EXILED}\" == \"true\" ]; then\r\n echo \"$(tput setaf 4)Downloading $(tput setaf 1)EXILED$(tput setaf 0)..\"\r\n mkdir .config\/\r\n echo \"$(tput setaf 4)Downloading latest $(tput setaf 1)EXILED$(tput setaf 4) Installer\"\r\n rm Exiled.Installer-Linux\r\n wget -q https:\/\/github.com\/galaxy119\/EXILED\/releases\/latest\/download\/Exiled.Installer-Linux\r\n chmod +x .\/Exiled.Installer-Linux\r\n\r\n if [ \"${EXILED_PRE}\" == \"true\" ]; then\r\n echo \"$(tput setaf 4)Installing $(tput setaf 1)EXILED (pre-release)...\"\r\n .\/Exiled.Installer-Linux --pre-releases\r\n\r\n elif [ \"${EXILED_PRE}\" == \"false\" ]; then\r\n echo \"$(tput setaf 4)Installing $(tput setaf 1)EXILED$(tput setaf 0)...\"\r\n .\/Exiled.Installer-Linux\r\n\r\n else\r\n echo \"$(tput setaf 4)Installing $(tput setaf 1)EXILED$(tput setaf 0) version: ${EXILED_PRE} ..\"\r\n .\/Exiled.Installer-Linux --target-version \"${EXILED_PRE}\"\r\n\r\n fi\r\nelse\r\n echo \"Skipping Exiled installation.\"\r\nfi\r\n\r\nif [ \"${REMOVE_UPDATER}\" == \"true\" ]; then\r\n echo \"Removing Exiled updater.\"\r\n rm \/mnt\/server\/.config\/EXILED\/Plugins\/Exiled.Updater.dll\r\nelse\r\n echo \"Skipping EXILED updater removal.\"\r\nfi\r\n\r\nif [ \"${INSTALL_INTEGRATION}\" == \"true\" ]; then\r\n echo \"Installing Latest Discord Integration Plugin...\"\r\n\r\n echo \"Removing old Discord Integration (if it exists)\"\r\n rm \/mnt\/server\/.config\/EXILED\/Plugins\/DiscordIntegration_Plugin.dll\r\n rm \/mnt\/server\/.config\/EXILED\/Plugins\/DiscordIntegration.dll\r\n\r\n echo \"$(tput setaf 5)Grabbing plugin and dependencies.\"\r\n wget -q https:\/\/github.com\/Exiled-Team\/DiscordIntegration\/releases\/latest\/download\/Plugin.tar.gz -P \/mnt\/server\/.config\/EXILED\/Plugins\r\n\r\n echo \"Extracting...\"\r\n tar xzvf \/mnt\/server\/.config\/EXILED\/Plugins\/Plugin.tar.gz\r\n rm \/mnt\/server\/.config\/EXILED\/Plugins\/Plugin.tar.gz\r\n\r\nelse\r\n echo \"Skipping Discord integration plugin install\"\r\nfi\r\n\r\nif [ \"${INSTALL_ADMINTOOLS}\" == \"true\" ]; then\r\n echo \"Removing existing Admin Tools version.\"\r\n rm .config\/EXILED\/Plugins\/AdminTools.dll\r\n echo \"$(tput setaf 5)Installing latest Admin Tools\"\r\n wget -q https:\/\/github.com\/Exiled-Team\/AdminTools\/releases\/latest\/download\/AdminTools.dll -P \/mnt\/server\/.config\/EXILED\/Plugins\r\n\r\nelse\r\n echo \"Skipping Admin Tools install.\"\r\nfi\r\n\r\nif [ \"${INSTALL_UTILITIES}\" == \"true\" ]; then\r\n echo \"Removing existing Common Utilities version.\"\r\n rm .config\/EXILED\/Plugins\/Common_Utilities.dll\r\n echo \"$(tput setaf 5)Installing Common Utilities.\"\r\n wget -q https:\/\/github.com\/Exiled-Team\/Common-Utils\/releases\/latest\/download\/Common_Utilities.dll -P \/mnt\/server\/.config\/EXILED\/Plugins\r\nelse\r\n echo \"Skipping Common Utilities Install\"\r\nfi\r\n\r\nif [ \"${INSTALL_SCPSTATS}\" == \"true\" ]; then\r\n echo \"Removing existing SCPStats version.\"\r\n rm .config\/EXILED\/Plugins\/SCPStats.dll\r\n echo \"$(tput setaf 5)Installing SCPStats\"\r\n wget -q https:\/\/github.com\/SCPStats\/Plugin\/releases\/latest\/download\/SCPStats.dll -P \/mnt\/server\/.config\/EXILED\/Plugins\r\nelse\r\n echo \"Skipping SCPStats Install.\"\r\nfi\r\n\r\nfunction pluginInstall() {\r\n # Caches the plugin to a json so only one request to Github is needed\r\n\r\n curl --silent -u \"${GITHUB_USERNAME}:${GITHUB_TOKEN}\" \"$1\" | jq . > plugin.json\r\n\r\n if [ \"$(jq -r .assets[0].browser_download_url plugin.json)\" == null ]; then\r\n echo \"\r\n $(tput setaf 5)ERROR GETTING PLUGIN DOWNLOAD URL!\r\n\r\n Inputted URL: $1\r\n\r\n You likely inputted the incorrect URL or have been rate-limited ( https:\/\/takeb1nzyto.space\/ )\r\n \"\r\n\r\n fi\r\n\r\n echo \"$(tput setaf 5)Installing $(jq -r .assets[0].name plugin.json) $(jq -r .tag_name plugin.json) by $(jq -r .author.login plugin.json)\"\r\n\r\n # For the evil people that put the version in their plugin name the old version will need to be manually deleted\r\n rm \/mnt\/server\/.config\/EXILED\/Plugins\/\"$(jq -r .assets[0].name plugin.json)\"\r\n\r\n echo \"$(jq -r .assets[0].browser_download_url plugin.json)\r\n \"\r\n\r\n wget -q \"$(jq -r .assets[0].browser_download_url plugin.json)\" -P \/mnt\/server\/.config\/EXILED\/Plugins\r\n\r\n rm plugin.json\r\n}\r\n\r\nif [ \"${INSTALL_CUSTOM}\" == \"true\" ]; then\r\n touch \/mnt\/server\/.egg\/customplugins.txt\r\n\r\n grep -v '^ *#' <\/mnt\/server\/.egg\/customplugins.txt | while IFS= read -r I; do\r\n pluginInstall \"${I}\"\r\n done\r\n\r\nfi\r\n\r\nif [ \"${INSTALL_BOT}\" == \"true\" ]; then\r\n echo \"Dont forget to configure the discord bot in \/home\/container\/config.yml\"\r\nfi\r\n\r\necho \"$(tput setaf 2)Installation Complete!$(tput sgr 0)\"\r\n\r\n##TODO - using git to sync configs with github\r\n\r\n##TODO - Append plugin version to file name so they dont reinstall when they dont need to be?", "container": "quay.io\/parkeymon\/scpsl-install:latest", "entrypoint": "bash" }