echo"This script will take for granted that you have all dependencies installed (mongodb, openjdk-17-jre/jre17-openjdk, wget, openssl, unzip, git, curl, base-devel), in fact, this script is recommended to update your current server installation, and it should run from the same folder as grasscutter.jar"
echo"#################################"
echo""
echo"If you are using version > 2.8 of the client, make sure to use the patched metadata if you don't use Cultivation."
echo"Search for METADATA here: https://discord.gg/grasscutter."
echo""
echo"#################################"
echo""
echo"Grasscutter will be installed to script's running directory"
echo"Do you wish to proceed and install Grasscutter?"
select yn in"Yes""No";do
case$ynin
Yes )break;;
No )
echo"Aborting..."
exit;;
esac
done
if[-d"./resources"]
then
echo"It's recommended to remove resources folder"
echo"Remove resources folder?"
select yn in"Yes""No";do
case$ynin
Yes )
rm-rf resources
break;;
No )
echo"Aborting..."
exit;;
esac
done
echo"You may need to remove data folder and config.json to apply some updates"
echo"#################################"
fi
# Allows choice between stable and dev branch
echo"Please select the branch you wish to install"
echo-e"!!NOTE!!: stable is the recommended branch.\nDo *NOT* use development unless you have a reason to and know what you're doing"
select branch in"stable""development";do
case$branchin
stable )
break;;
development )
break;;
esac
done
echo-e"Using $branch branch for installing server \n"
# Prompt IP address for config.json and for generating new keystore.p12 file
echo"Please enter the IP address that will be used to connect to the server"
echo"This can be a local or a public IP address"
echo"This IP address will be used to generate SSL certificates, so it is important it is correct!"