From cc03139c2886144d4a15da4996c8b85d716178bd Mon Sep 17 00:00:00 2001 From: Wild1145 Date: Sun, 27 Jun 2021 21:06:57 +0100 Subject: [PATCH] I think the DB Shit works now --- FreeOP Servers/.env.sh | 13 +++++++++---- FreeOP Servers/reset.sh | 8 ++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/FreeOP Servers/.env.sh b/FreeOP Servers/.env.sh index 26a2b42..f4831ed 100644 --- a/FreeOP Servers/.env.sh +++ b/FreeOP Servers/.env.sh @@ -1,14 +1,19 @@ #! # These ones should be server specific -JVM_HEAP="18G" +JVM_HEAP="6G" 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 SCREEN_NAME="TotalFreedom" SARCASTIC_MESSAGE="The server is not running... Why don't you try starting it? <3" -RESET_FILE=/home/tfserver/.resetting -JVM_LAUNCH_OPTS="-XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10" +RESET_FILE="/home/tfserver/.resetting" +#JVM_LAUNCH_OPTS="-XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10" #Java 16 Launch Opts -#JVM_LAUNCH_OPTS="-illegal-access=permit -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10" \ No newline at end of file +JVM_LAUNCH_OPTS="--illegal-access=permit -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10" \ No newline at end of file diff --git a/FreeOP Servers/reset.sh b/FreeOP Servers/reset.sh index b2fc143..122befd 100644 --- a/FreeOP Servers/reset.sh +++ b/FreeOP Servers/reset.sh @@ -44,6 +44,14 @@ else fi 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 echo "Something Something restore the template to be the world, something something I'll get around to this..."