diff --git a/SCP-SL-Exiled-Egg.json b/SCP-SL-Exiled-Egg.json index 78f1796..4e433c3 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-10-24T08:48:31-07:00", + "exported_at": "2021-10-24T12:02:21-07:00", "name": "EXILED SCP:SL Egg", "author": "pwolfe@stealthturtle.com", "description": "Egg for SCP: Secret Laboratory Dedicated Linux Server", @@ -22,7 +22,7 @@ }, "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.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 -C \/mnt\/server\/.config\/EXILED\/Plugins\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.2.0\"\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 .egg\/DIBot\/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 mkdir \/mnt\/server\/.egg\/DIBot\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 \/mnt\/server\/.egg\/BotConfigTemp\r\n echo \"Moving config.\"\r\n mv \/mnt\/server\/.egg\/DIBot\/config.yml \/mnt\/server\/.egg\/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 -C \/mnt\/server\/.egg\/DIBot\r\n rm DiscordIntegration.Bot.tar.gz\r\n\r\n echo \"$(tput setaf 4)Patching Discord Integration bot...\"\r\n sed -i 's|.\/config.yml|.egg\/DIBot\/config.yml|g' \/mnt\/server\/.egg\/DIBot\/discordIntegration.js\r\n sed -i 's|.\/synced-roles.yml|.egg\/DIBot\/synced-roles.yml|g' \/mnt\/server\/.egg\/DIBot\/discordIntegration.js\r\n\r\n if [ \"${CONFIG_SAVER}\" == \"true\" ]; then\r\n echo \"Deleting config\"\r\n rm \/mnt\/server\/.egg\/DIBot\/config.yml\r\n echo \"Replacing Config\"\r\n mv \/mnt\/server\/.egg\/BotConfigTemp\/config.yml \/mnt\/server\/.egg\/DIBot\r\n echo \"Removing temporary directory\"\r\n rm -r \/mnt\/server\/.egg\/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 --cwd \/mnt\/server\/.egg\/DIBot 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\"\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 -C \/mnt\/server\/.config\/EXILED\/Plugins\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\/.egg\/DIBot\/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" } @@ -39,7 +39,7 @@ }, { "name": "Beta Tag", - "description": "", + "description": "Set to \"none\" for no beta.", "env_variable": "BETA_TAG", "default_value": "none", "user_viewable": true, diff --git a/script.sh b/script.sh index a88a4a1..8f6b83d 100644 --- a/script.sh +++ b/script.sh @@ -13,7 +13,7 @@ $(tput setaf 1) ___ __ __ __ $(tput setaf 1)| | ____ _______/ |______ | | | | ___________ $(tput setaf 1)| |/ \ / ___/\ __\__ \ | | | | _/ __ \_ __ | $(tput setaf 1)| | | |\___ \ | | / __ \| |_| |_\ ___/| | \/ -$(tput setaf 1)|___|___|__/______> |__| (______|____|____/\___ |__| +$(tput setaf 1)|___|___|__/______| |__| (______|____|____/\___ |__| $(tput setaf 0) " @@ -22,7 +22,7 @@ $(tput setaf 2)This installer was created by $(tput setaf 1)Parkeymon#0001 " # Egg version checking, do not touch! -currentVersion="2.1.5" +currentVersion="2.2.0" latestVersion=$(curl --silent "https://api.github.com/repos/Parkeymon/EXILED-SCP-SL-egg/releases/latest" | jq -r .tag_name) if [ "${currentVersion}" == "${latestVersion}" ]; then @@ -80,7 +80,7 @@ mkdir .egg if [ "${INSTALL_BOT}" == "true" ]; then echo "#!/bin/bash - node discordIntegration.js > /dev/null & + node .egg/DIBot/discordIntegration.js > /dev/null & ./LocalAdmin \${SERVER_PORT}" >>start.sh echo "$(tput setaf 4)Finished configuring start.sh for LocalAdmin and Discord Integration.$(tput setaf 0)" @@ -92,32 +92,37 @@ else fi if [ "${INSTALL_BOT}" == "true" ]; then + mkdir /mnt/server/.egg/DIBot if [ "${CONFIG_SAVER}" == "true" ]; then echo "$(tput setaf 4)Config Saver is $(tput setaf 2)ENABLED" echo "Making temporary directory" - mkdir BotConfigTemp + mkdir /mnt/server/.egg/BotConfigTemp echo "Moving config." - mv config.yml ./BotConfigTemp + mv /mnt/server/.egg/DIBot/config.yml /mnt/server/.egg/BotConfigTemp fi echo "$(tput setaf 4)Installing latest Discord Integration bot version." wget -q https://github.com/Exiled-Team/DiscordIntegration/releases/latest/download/DiscordIntegration.Bot.tar.gz - tar xzvf DiscordIntegration.Bot.tar.gz + tar xzvf DiscordIntegration.Bot.tar.gz -C /mnt/server/.egg/DIBot rm DiscordIntegration.Bot.tar.gz + echo "$(tput setaf 4)Patching Discord Integration bot..." + sed -i 's|./config.yml|.egg/DIBot/config.yml|g' /mnt/server/.egg/DIBot/discordIntegration.js + sed -i 's|./synced-roles.yml|.egg/DIBot/synced-roles.yml|g' /mnt/server/.egg/DIBot/discordIntegration.js + if [ "${CONFIG_SAVER}" == "true" ]; then echo "Deleting config" - rm config.yml + rm /mnt/server/.egg/DIBot/config.yml echo "Replacing Config" - mv ./BotConfigTemp/config.yml ./ + mv /mnt/server/.egg/BotConfigTemp/config.yml /mnt/server/.egg/DIBot echo "Removing temporary directory" - rm -r BotConfigTemp + rm -r /mnt/server/.egg/BotConfigTemp echo "$(tput setaf 4)Your configs have been saved!" fi echo "$(tput setaf 4)Updating Packages" - yarn install + yarn --cwd /mnt/server/.egg/DIBot install else echo "$(tput setaf 4)Skipping bot install...$(tput setaf 0)" @@ -158,7 +163,7 @@ fi if [ "${INSTALL_INTEGRATION}" == "true" ]; then echo "Installing Latest Discord Integration Plugin..." - echo "Removing old Discord Integration (if it exists)" + echo "Removing old Discord Integration" rm /mnt/server/.config/EXILED/Plugins/DiscordIntegration_Plugin.dll rm /mnt/server/.config/EXILED/Plugins/DiscordIntegration.dll @@ -240,7 +245,7 @@ if [ "${INSTALL_CUSTOM}" == "true" ]; then fi if [ "${INSTALL_BOT}" == "true" ]; then - echo "Dont forget to configure the discord bot in /home/container/config.yml" + echo "Dont forget to configure the discord bot in /home/container/.egg/DIBot/config.yml" fi echo "$(tput setaf 2)Installation Complete!$(tput sgr 0)"