From adc73e28562b14644b187640b8a2a762a9789f1f Mon Sep 17 00:00:00 2001 From: SturdyStubs Date: Sat, 10 Aug 2024 19:17:51 +0200 Subject: [PATCH] update entrypoint to mirror beta --- games/carbon/entrypoint.sh | 102 +------------------------------------ 1 file changed, 1 insertion(+), 101 deletions(-) diff --git a/games/carbon/entrypoint.sh b/games/carbon/entrypoint.sh index d2c5dd8..2eea2fc 100644 --- a/games/carbon/entrypoint.sh +++ b/games/carbon/entrypoint.sh @@ -19,112 +19,12 @@ cd /home/container # APP PUBLIC IP FIX # ######################## -<<<<<<< HEAD -printf "╭───────────────────────────────────────────────╮\n" -printf "│ AIO RUST EGG │\n" -printf "│ Created By: SturdyStubs │\n" -printf "├───────────────────────────────────────────────┤\n" -printf "│ For More Information See The Documentation │\n" -printf "│ https://tinyurl.com/aiorustegg │\n" -printf "╰───────────────────────────────────────────────╯\n" - - -printf "${BLUE}Starting Egg Now!${NC}" -sleep 2 - -echo "Checking MODDING_ROOT folder compatibility with selected framework" -# Check if carbon framework is being used, and if it is, make sure that the MODDING_ROOT contains the word carbon -if [[ "${FRAMEWORK}" =~ "carbon" ]] && [[ ! "${MODDING_ROOT}" =~ "carbon" ]]; then - printf "${RED}ERROR: Your framework is ${FRAMEWORK} but your MODDING_ROOT folder does not contain the word \"carbon\". Please change the MODDING_ROOT variable to contain the word \"carbon\" for compatibility reasons.${NC}" - exit 1 -fi - -# Do the same for oxide -if [[ "${FRAMEWORK}" =~ "oxide" ]] && [[ ! "${MODDING_ROOT}" =~ "oxide" ]]; then - printf "${RED}ERROR: Your framework is ${FRAMEWORK} but your MODDING_ROOT folder does not contain the word \"oxide\". Please change the MODDING_ROOT variable to contain the word \"oxide\" for compatibility reasons.${NC}" - exit 1 -fi - -printf "${GREEN}Compatibility check passed...${NC}" - -# Checking Carbon Root Directory Issues -if [[ "${FRAMEWORK}" =~ "carbon" ]]; then - echo "Carbon framework detected!" - echo "Checking the carbon root directory structure..." - if [ -d ${MODDING_ROOT} ]; then - printf "${BLUE}${MODDING_ROOT} folder already exists... Skipping this part.${NC}" - else - if [ ! -d "carbon" ] && [ "${MODDING_ROOT}" != "carbon" ]; then - printf "${RED}Carbon default root directory folder does not exist. Please change your Modding Root Directory folder name to \"carbon\", and restart your server.${NC}" - exit 1 - elif [ ! -d "carbon" ] && [ "${MODDING_ROOT}" == "carbon" ]; then - print "${YELLOW}${MODDING_ROOT} is set as the MODDING_ROOT folder, however it doesn't exist. It will be created after server validation.${NC}" - else - echo "${MODDING_ROOT} folder does not exist. Creating new folder..." - mkdir -p /home/container/${MODDING_ROOT} - echo "Copying files and folders from default carbon directory." - cp -r /home/container/carbon/* ${MODDING_ROOT} - printf "${GREEN}Files copied. Moving on...${NC}" - fi - fi -fi - -# Clean Up Files from Oxide to Vanilla/Carbon Switch -if [[ "${FRAMEWORK}" != "oxide" ]]; then - # Remove files in RustDedicated/Managed if not using Oxide - echo "Modding Framework is set to: ${FRAMEWORK}" - echo "Checking if there are left over Oxide files in RustDedicated_Data/Managed" - mkdir -p /home/container/carbon/extensions/ - shopt -s nullglob - # Check if the Oxide.dll files exist - files=(/home/container/RustDedicated_Data/Managed/Oxide.*.dll) - if [ ${#files[@]} -gt 0 ]; then - echo "Oxide Files Found! Cleaning Up" - if [[ "${FRAMEWORK}" =~ "carbon" ]]; then - # Check to see if any Oxide extensions need to be moved - files=(/home/container/RustDedicated_Data/Managed/Oxide.Ext.*.dll) - if [ ${#files[@]} -gt 0 ]; then - echo "Moving Oxide Extensions to Carbon/Extensions folder..." - mv -v /home/container/RustDedicated_Data/Managed/Oxide.Ext.*.dll /home/container/${MODDING_ROOT}/extensions/ - printf "${GREEN}Move files has completed successfully!${NC}" - else - printf "${GREEN}No Oxide Extensions to Move... Skipping the move...${NC}" - fi - else - echo "${FRAMEWORK} does not support Oxide Extensions. Possibly because the framework is vanilla. If you see this and your framework isn't vanilla, then contact the developers." - fi - # Clean up the rust dedicated managed folder - echo "Cleaning up RustDedicated_Data/Managed folder..." - rm -rf RustDedicated_Data/Managed/* - echo "Removing Oxide Compiler..." - rm -rf Oxide.Compiler - printf "${GREEN}Oxide files have been cleaned up!${NC}" - else - printf "${GREEN}No Oxide files found to remove - continuing startup...${NC}" - fi - shopt -u nullglob -fi - -#echo -e "IF YOU ARE SEEING THIS, CONTACT THE DEVELOPER TO REMOVE" -#sleep 20 - -# if auto_update is not set or to 1 update - if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ] && [ "${VALIDATE}" == "0" ]; then - ./steamcmd/steamcmd.sh +force_install_dir /home/container +login anonymous +app_update 258550 +quit -elif - [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ] && [ "${VALIDATE}" == "1" ]; then - ./steamcmd/steamcmd.sh +force_install_dir /home/container +login anonymous +app_update 258550 validate +quit -else - echo -e "Auto update set to false. Not validating game files or updating game." - echo -e "${BLUE}Starting server..." -======= if [ -f /sections/app_public_ip.sh ]; then Debug "/sections/app_public_ip.sh exists and is found!" # Directly run the script without chmod source /sections/app_public_ip.sh else Error "/sections/app_public_ip.sh does not exist or cannot be found." "1" ->>>>>>> 33fb0a38dcde3494f5d004fae40484c072f9be98 fi #################################### @@ -233,4 +133,4 @@ export LD_LIBRARY_PATH=$(pwd)/RustDedicated_Data/Plugins/x86_64:$(pwd) /bin/bash /end_screen.sh # Run the Server -node /wrapper.js "${MODIFIED_STARTUP}" \ No newline at end of file +node /wrapper.js "${MODIFIED_STARTUP}"