From efe9315292b6f56248b026109b354aa95c85ba89 Mon Sep 17 00:00:00 2001 From: Wild1145 Date: Sat, 3 Jul 2021 16:13:56 +0100 Subject: [PATCH] Add some comments and also ensure we archive spawn.yml The spawn.yml means sometimes the default spawn point ends up in strange places, we don't want that. --- FreeOP Servers/reset.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/FreeOP Servers/reset.sh b/FreeOP Servers/reset.sh index 1d69da7..56bafcb 100644 --- a/FreeOP Servers/reset.sh +++ b/FreeOP Servers/reset.sh @@ -47,6 +47,7 @@ else fi done + # Archives out the CoreProtect Database for history. if ls /home/tfserver/plugins/CoreProtect-* 1> /dev/null 2>&1; then mysqldump -h $DB_HOSTNAME $CO_DATABASE --no-tablespaces > $CO_DATABASE-$TIMESTAMP.sql @@ -58,6 +59,13 @@ else mysql $CO_DATABASE -h $DB_HOSTNAME < ./temp.sql fi + # Archives out the Essentials spawnpoints for history. + if ls /home/tfserver/plugins/Essentials-* 1> /dev/null 2>&1; + then + mv /home/tfserver/plugins/Essentials/spawn.yml /home/tfserver/archives/Essentials-spawn.yml-$TIMESTAMP.yml + echo "Essentials Spawn Configuration downloaded to /home/tfserver/archives/$CO_DATABASE-$TIMESTAMP.sql" + fi + cp -R /home/tfserver/template/$1 /home/tfserver/world # Remove that lock file now that we actually want to start the server up.