I think the DB Shit works now

This commit is contained in:
Wild1145 2021-06-27 21:06:57 +01:00
parent 53b0fa94df
commit cc03139c28
2 changed files with 17 additions and 4 deletions

View file

@ -1,14 +1,19 @@
#! #!
# These ones should be server specific # These ones should be server specific
JVM_HEAP="18G" JVM_HEAP="6G"
PAPER_JAR_NAME="paperclip.jar" PAPER_JAR_NAME="paperclip.jar"
# More Server specific ones - This time for CoreProtect
DB_HOSTNAME="db04.core.atlas-media.co.uk"
CO_DATABASE="DEV_TotalFreedom-Freedom2-CoreProtect"
#Follow https://stackoverflow.com/questions/9293042/how-to-perform-a-mysqldump-without-a-password-prompt for Username & Password
# DO NOT Change these ones # DO NOT Change these ones
SCREEN_NAME="TotalFreedom" SCREEN_NAME="TotalFreedom"
SARCASTIC_MESSAGE="The server is not running... Why don't you try starting it? <3" SARCASTIC_MESSAGE="The server is not running... Why don't you try starting it? <3"
RESET_FILE=/home/tfserver/.resetting RESET_FILE="/home/tfserver/.resetting"
JVM_LAUNCH_OPTS="-XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10" #JVM_LAUNCH_OPTS="-XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10"
#Java 16 Launch Opts #Java 16 Launch Opts
#JVM_LAUNCH_OPTS="-illegal-access=permit -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10" JVM_LAUNCH_OPTS="--illegal-access=permit -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10"

View file

@ -44,6 +44,14 @@ else
fi fi
done done
if ls /home/tfserver/plugins/CoreProtect-* 1> /dev/null 2>&1;
then
mysqldump -h $DB_HOSTNAME $CO_DATABASE --no-tablespaces > $CO_DATABASE-$TIMESTAMP.sql
mv /home/tfserver/$CO_DATABASE-$TIMESTAMP.sql /home/tfserver/archives/$CO_DATABASE-$TIMESTAMP.sql
else
echo "Big yay, no database shite"
fi
# Need to add something around handling the MySQL shit here # Need to add something around handling the MySQL shit here
echo "Something Something restore the template to be the world, something something I'll get around to this..." echo "Something Something restore the template to be the world, something something I'll get around to this..."